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 D861F78003C for ; Tue, 7 Nov 2023 03:31:54 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=2oxBBWs3TaVXSi737WH+NpY30dDt5spdqM2aocQf80U=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results: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:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1699327913; v=1; b=hqhSr5xAlatlVuSC2blkx9g274EuiTCrhOlb2JOZoHpIsn7Zlv/mTzO2v222B+KLh586q4dx aO2y4wOjUjzYgubDUiiQ5xXhKaMZ88g2yTFB6AA8UH7CSMtrjGZene+iFx+xVQd0fQBt7vhrr0c 38BD3rRbt3mjHSReWMz8/vho= X-Received: by 127.0.0.2 with SMTP id TbpMYY7687511x47p1oCdc69; Mon, 06 Nov 2023 19:31:53 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mx.groups.io with SMTP id smtpd.web11.2767.1699327913114031433 for ; Mon, 06 Nov 2023 19:31:53 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10886"; a="10963955" X-IronPort-AV: E=Sophos;i="6.03,282,1694761200"; d="scan'208";a="10963955" X-Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2023 19:31:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10886"; a="1009731024" X-IronPort-AV: E=Sophos;i="6.03,282,1694761200"; d="scan'208";a="1009731024" X-Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga006.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 06 Nov 2023 19:31:52 -0800 X-Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 6 Nov 2023 19:31:52 -0800 X-Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 6 Nov 2023 19:31:51 -0800 X-Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Mon, 6 Nov 2023 19:31:51 -0800 X-Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Mon, 6 Nov 2023 19:31:50 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ze9OLU4X5B7jtxNc4lfn+AumSLgBrvn0BK1JsdCB96fRAmRo8ksDt6yztT/Rn7sUIhk/sj80OXWQFt/SWGchD95T/VnxmanAoxhdEVenIAtQ3uW30ocIsWm8FktXLe5U/0/E2+ZFQfcDsiNlSn7GdrwSILHUhxkZBpnqmsvVu3vnYVawjC/sS/GPF/oxbSz8H9Kthwh2+CEpEIiraNZHXYaMmNT4HSQRZAyiSB0lWch0IsZ3vbcvpJHHr1upj+dU+TKuUzt82TKiRNlB/YSDqpSZNDhY2sHMULHj90V8JhXKPexuNfRxPR5QQ8wPYVZvmk0qUBrUNyGYO9Elq5R2dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Tw+67xgm1ON6iiD7QTzX2RnM5NE4qo9sSSin4v4FOT4=; b=hA5SnZAVx5vcPH30k86eGUlrm48JS+cQj62Y91IQNAWleSwPtHpT7kd2JepJivUI40aZ2N0VwGq8NNBizqcNTYS8ScuZ/9snV9wqvcla1eeHyQia53Tv7l1Xw4W3eifl4a4EUpXcY29hLRkTPrdogcZp6kSK1RrLlGMFLUnDtcI7HrQBcdaDXaIBFgnr/+Bw4yzIs0NaFiE56Q8w/MfCYlTLQqb5TBW/Ie7YvobbEyzLM1xoJErPLwnOkPcmQV3wDeNYzCm6IhOECvgkhmU6x6GRxE0UxKQfn5PjLSSmskxN3vEwPuvqznck7aqlFFWsnH2Nh1E17cjUOQx1jocwDQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com (2603:10b6:303:6d::19) by DM8PR11MB5606.namprd11.prod.outlook.com (2603:10b6:8:3c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 03:31:46 +0000 X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::a2a0:3c59:8d07:7f]) by CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::a2a0:3c59:8d07:7f%6]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 03:31:46 +0000 From: "Michael D Kinney" To: Chao Li , "devel@edk2.groups.io" CC: "Gao, Liming" , "Liu, Zhiguang" , "Kinney, Michael D" Subject: Re: [edk2-devel] [PATCH v2 06/30] MdePkg: Add read stable counter operation for LoongArch Thread-Topic: [PATCH v2 06/30] MdePkg: Add read stable counter operation for LoongArch Thread-Index: AQHaEGE3ft5ZHGsz70m1gIirU4scfbBuNRVg Date: Tue, 7 Nov 2023 03:31:46 +0000 Message-ID: References: <20231106032521.2251143-1-lichao@loongson.cn> <20231106032715.2273314-1-lichao@loongson.cn> In-Reply-To: <20231106032715.2273314-1-lichao@loongson.cn> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO1PR11MB4929:EE_|DM8PR11MB5606:EE_ x-ms-office365-filtering-correlation-id: e3e45ab2-1b34-4685-12c2-08dbdf4211bf x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: HYz7j+T/GUjDhPjGAAcBYViBnW9+/PrP7J2l3A+ZzVdKDkxZltQRn+kmFI5+P9XX5h5cAVg97PARkxf3qHS01eBwzIbHKbVYIzSDBH0QVYCmo1mvSZiDSXF8RJNStSfRkwM3PGF0gAVQDg1oHr3dYWFUDSTV+8INTYslHwIeUgBOXce1ns6aflmFu2xpNDhE8Zq5SVHVYrJDSsXbTIdAs/WyWnb4JA4acuda8/FDpMUmn24UzWqZO5ahsf/WaP5OnAoFx+ieqGyaZG1r2wB5BXrfd0zAGpUEA/T5X5BKKhosUA3pAIYYDIxSEWrydMym3pmc1KadMoQQKjiAAAoVguabgd7C70sGOs/icocd/6uFeqZ80ZDh2kw6GLsJkEZe5H7RgWGWPw3ui0DdKIkB5P+jiF3O9yhknH/TmomqLRAp3UWbYE0nUxdoZINB05z++HfIIhnh20X1lTO418QH8IYVWFBEzNEC7Kpwdhh/8Mqw7Ja9ysqpdMYJeilxQWSoiKFNg9xWhXCU/XA+QmagpPO2oMNs6XWGOwdfTZFTBGTJup74Rj+qRpOhKQy9478qShjd76HOV1NhFLUb+IKKR79cDPkGdaMgnFb7My1TVQ0= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?StDextkg1fw5p1Ko79wdcZfjSUxM9YclfwWFw09ewY0CAme3Sp1MsjyH6JLM?= =?us-ascii?Q?aGcwy7ByV/71gGY0OiVe6mHM/qMYG8yPGWwYF3OTNMw/CRlZCiEKZTivl3ac?= =?us-ascii?Q?Z1reQGmUoa2UX+XP7KKDpcplpbzwNq2jQXaORFG6+Ms0cgYqsE743ejLAtjA?= =?us-ascii?Q?BtAWP5BrUDVHSM9CrXFdgZt9AZ9yQRRRLvWQqipxIZOJxlpqSWC+H5fHeKVa?= =?us-ascii?Q?uiocauWUvbt8STh8XQfh5uLL1FcveRck1v7c0Sl+/Fw0EYPwAGpZk/Jqua2x?= =?us-ascii?Q?SUdWTkZO8EC7aeVWzdCChx9a5LXUgkUldOkIJ7+UW0dBpCy/spgc3gChJWcu?= =?us-ascii?Q?2cuy50wpLS4wf4wshiVhaLT5JfReX/0DXpn42enhrL6EtOGYiFgt87mTkUMV?= =?us-ascii?Q?xcQfpTLN3/JvfomdoTVpDzg/pUIULZ5Yfm0fvgOBHWPOowDxd2W1dEkFguB9?= =?us-ascii?Q?G3QPzEX7wUcLoxTJK8MW2Atd/BPZZFUDA+c68Lnjskh5TjXJ9+kLV7zHFJB0?= =?us-ascii?Q?RsWrhQY0PVW9Zs4GK6k1G2SayH5aRjEI4VQ0IwU3jqK66dhGlPJlMAlt3nrK?= =?us-ascii?Q?rogEZx3fjmdzn41UvSME/neUc3RXLmXX3/oaxGR5fpiXuxQAxW/yR7KoRKB/?= =?us-ascii?Q?lK//uJA23e1kYLBFU/nyoGW3HIUO4wj/DeI1dwsY0z3DQC7/3t15HDrFxXVz?= =?us-ascii?Q?ElHxNkF4Lu9uZilzPaFQkRmM9Goy4acf5eed3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MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4929.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e3e45ab2-1b34-4685-12c2-08dbdf4211bf X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Nov 2023 03:31:46.1328 (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: d168w0l2WH+1eoCGWb8tQ/oWgLKtA13tZIH4a6X5KobDn/+tUWUVCU1kjnf2bFheb/Vitp5bJ/cixb5o+w1plIiFnZOPFZweCkUa59e4F7Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR11MB5606 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 Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: pv8z8SiV5kZvGhoL68adHUIvx7686176AA= 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=20140610 header.b=hqhSr5xA; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); 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 Acked-by: Michael D Kinney > -----Original Message----- > From: Chao Li > Sent: Sunday, November 5, 2023 7:27 PM > To: devel@edk2.groups.io > Cc: Kinney, Michael D ; Gao, Liming > ; Liu, Zhiguang > Subject: [PATCH v2 06/30] MdePkg: Add read stable counter operation > for LoongArch >=20 > Add LoongArch gets stable counter ASM function. >=20 > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4584 >=20 > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Zhiguang Liu > Signed-off-by: Chao Li > --- > MdePkg/Include/Library/BaseLib.h | 12 ++++++++++ > MdePkg/Library/BaseLib/BaseLib.inf | 1 + > .../BaseLib/LoongArch64/ReadStableCounter.S | 24 > +++++++++++++++++++ > 3 files changed, 37 insertions(+) > create mode 100644 > MdePkg/Library/BaseLib/LoongArch64/ReadStableCounter.S >=20 > diff --git a/MdePkg/Include/Library/BaseLib.h > b/MdePkg/Include/Library/BaseLib.h > index 3adf4d0042..55d53c75a0 100644 > --- a/MdePkg/Include/Library/BaseLib.h > +++ b/MdePkg/Include/Library/BaseLib.h > @@ -281,6 +281,18 @@ AsmCpucfg ( > OUT UINT32 *Data > ); >=20 > +/** > + Gets the timer count value. > + > + @param[] VOID > + @retval timer count value. > + > +**/ > +UINTN > +AsmReadStableCounter ( > + VOID > + ); > + > #endif // defined (MDE_CPU_LOONGARCH64) >=20 > // > diff --git a/MdePkg/Library/BaseLib/BaseLib.inf > b/MdePkg/Library/BaseLib/BaseLib.inf > index a427aa9359..aaf221822b 100644 > --- a/MdePkg/Library/BaseLib/BaseLib.inf > +++ b/MdePkg/Library/BaseLib/BaseLib.inf > @@ -421,6 +421,7 @@ > LoongArch64/SwitchStack.S | GCC > LoongArch64/ExceptionBase.S | GCC > LoongArch64/Cpucfg.S | GCC > + LoongArch64/ReadStableCounter.S | GCC >=20 > [Packages] > MdePkg/MdePkg.dec > diff --git a/MdePkg/Library/BaseLib/LoongArch64/ReadStableCounter.S > b/MdePkg/Library/BaseLib/LoongArch64/ReadStableCounter.S > new file mode 100644 > index 0000000000..59c877211d > --- /dev/null > +++ b/MdePkg/Library/BaseLib/LoongArch64/ReadStableCounter.S > @@ -0,0 +1,24 @@ > +#-------------------------------------------------------------------- > ---------- > +# > +# LoongArch Read Stable Counter > +# > +# Copyright (c) 2023, Loongson Technology Corporation Limited. All > rights reserved.
> +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > +#-------------------------------------------------------------------- > ---------- > + > +ASM_GLOBAL ASM_PFX(AsmReadStableCounter) > + > +#/** > +# Gets the timer count value. > +# > +# @param[] VOID > +# @retval timer count value. > +# > +#**/ > + > +ASM_PFX(AsmReadStableCounter): > + rdtime.d $a0, $zero > + jirl $zero, $ra, 0 > + .end > -- > 2.27.0 -=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 (#110792): https://edk2.groups.io/g/devel/message/110792 Mute This Topic: https://groups.io/mt/102413854/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-