From nobody Mon Feb 9 14:33:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+46786+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+46786+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=hpe.com ARC-Seal: i=1; a=rsa-sha256; t=1567595617; cv=none; d=zoho.com; s=zohoarc; b=RLS3etSBleGWAQlLRZtGHwUWH/wcf2eHaHWjLn0DtFIluWvmY5ERtNRqej7+z3PX5cAJCKTIkRtTr9O2P26tT6rKGPkreIkzuXaHFN917gspMS3gQzo4Ek3y4vuflaVRG1WEBN2yocolX/zLdP4GIjdUoL1e5etOMMGuxkVvq3E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567595617; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=SLzvi6nF3ntUvc3W8kdjAmt+WF6r9VCQY2bdrrijHmk=; b=iEazgRzDFOAVMIRV0tDPR2JczbTvU8JCmxgNIOOdgW54mi8Sg7EJssggUD6bKQ32pJft1CP4a2iNAWiN2krtUu+c/GSlysWtpwxBPZlhQ7pxIKZJj+Q/f01L0CqQvOmpcp64T5d+yqUjHKZZbaQkIAQrKFfMiyMk2FrYHjun5OQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+46786+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1567595617625824.6791193373966; Wed, 4 Sep 2019 04:13:37 -0700 (PDT) Return-Path: X-Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by groups.io with SMTP; Wed, 04 Sep 2019 04:13:36 -0700 X-Received: from pps.filterd (m0134423.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x84BBfvk016728 for ; Wed, 4 Sep 2019 11:13:36 GMT X-Received: from g2t2352.austin.hpe.com (g2t2352.austin.hpe.com [15.233.44.25]) by mx0b-002e3701.pphosted.com with ESMTP id 2usra9rck8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 04 Sep 2019 11:13:36 +0000 X-Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2352.austin.hpe.com (Postfix) with ESMTP id 6DE57B1 for ; Wed, 4 Sep 2019 11:13:35 +0000 (UTC) X-Received: from UB16Abner.asiapacific.hpqcorp.net (ub16abner.asiapacific.hpqcorp.net [15.119.209.44]) by g2t2360.austin.hpecorp.net (Postfix) with ESMTP id 848B539; Wed, 4 Sep 2019 11:13:34 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: abner.chang@hpe.com Subject: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 09/22]: MdePkg/BaseCpuLib: RISC-V Base CPU library implementation. Date: Wed, 4 Sep 2019 18:43:04 +0800 Message-Id: <1567593797-26216-10-git-send-email-abner.chang@hpe.com> In-Reply-To: <1567593797-26216-1-git-send-email-abner.chang@hpe.com> References: <1567593797-26216-1-git-send-email-abner.chang@hpe.com> X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 Precedence: Bulk List-Unsubscribe: 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,abner.chang@hpe.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1567595617; bh=gfFYvHa+KR8HW3jxEoGwx/K+C3uQGcnEAFnZgBLsgLU=; h=Cc:Date:From:Reply-To:Subject:To; b=axlAmU3P+TBdgcOXEeKw0wY1Qixjxsr8/NeStwgwuQYHsQJpQ4t80YYMHKfhv9eTZxD nRMLY0EE8FJzNq/Ywg3wmqyyPT1WZdJHHYYdYwEjeuUR1HoUGypYFDWlq/W1Sryu4yd0S inJKq9tEq4LWP2N634X43qCPLED10vvT2nA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Implement RISC-V CPU related functions in BaseCpuLib. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Abner Chang --- MdePkg/Library/BaseCpuLib/BaseCpuLib.inf | 4 ++++ MdePkg/Library/BaseCpuLib/RiscV/Cpu.s | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 MdePkg/Library/BaseCpuLib/RiscV/Cpu.s diff --git a/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf b/MdePkg/Library/Base= CpuLib/BaseCpuLib.inf index a7cb381..20ee774 100644 --- a/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf +++ b/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf @@ -7,6 +7,7 @@ # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
# Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.
+# Copyright (c) 2016, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -59,6 +60,9 @@ AArch64/CpuFlushTlb.asm | MSFT AArch64/CpuSleep.asm | MSFT =20 +[Sources.RISCV64] + RiscV/Cpu.s + [Packages] MdePkg/MdePkg.dec =20 diff --git a/MdePkg/Library/BaseCpuLib/RiscV/Cpu.s b/MdePkg/Library/BaseCpu= Lib/RiscV/Cpu.s new file mode 100644 index 0000000..9a1bf0f --- /dev/null +++ b/MdePkg/Library/BaseCpuLib/RiscV/Cpu.s @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------= ------ +// +// CpuSleep for RISC-V +// +// Copyright (c) 2016, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
+// This program and the accompanying materials +// are licensed and made available under the terms and conditions of the B= SD License +// which accompanies this distribution. The full text of the license may = be found at +// http://opensource.org/licenses/bsd-license.php. +// +// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IM= PLIED. +// +//------------------------------------------------------------------------= ------ +.data +.align 3 +.section .text + +.global ASM_PFX(_CpuSleep) + +ASM_PFX(_CpuSleep): + wfi + ret + + --=20 2.7.4 -=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 (#46786): https://edk2.groups.io/g/devel/message/46786 Mute This Topic: https://groups.io/mt/33137132/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-