From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web11.151669.1680758806637645849 for ; Wed, 05 Apr 2023 22:26:49 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=ihG4JdXd; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: evan.chai@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680758809; x=1712294809; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5zpOO1/yP7YyjF9ZG7Zg+bUb6PeQ1YZNAow+FV3DI4g=; b=ihG4JdXdtfePg097/GZ4okK8BHlGI1tF0keGS23rFf83Zxxxre59f8tT YA+uOUbnUyj2mM1U/g+dpF6k0VoyhEwepWqqhSfQHf6Sp0WDGU0s8TYww nZGxX48ja5meFoHzTtgHK2v2gQXQdA64B355ttV7mdyJ96jYX9ZtUPK/V PSehh6hnYu2Ke6ImFixPusiZVj29cDFXgaJpWgIhMacofr1wGJ8A8jx/X RRjWBwuUDZpx/KDuTF9hhgW6jmhfJSuan4rjqVX1+RxyhPh9Ix5FTXn7b QEYsC5D2s4WwktGbAUIzDUHr6wS/pykUyDP4eOYYru5a4iwKpIgSwEAKJ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10671"; a="323020664" X-IronPort-AV: E=Sophos;i="5.98,322,1673942400"; d="scan'208";a="323020664" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2023 22:26:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10671"; a="776325009" X-IronPort-AV: E=Sophos;i="5.98,322,1673942400"; d="scan'208";a="776325009" Received: from evancy.sh.intel.com ([10.239.158.113]) by FMSMGA003.fm.intel.com with ESMTP; 05 Apr 2023 22:26:47 -0700 From: "Chai, Evan" To: devel@edk2.groups.io Cc: Daniel Schaefer , Sunil V L , Andrei Warkentin Subject: [edk2-platforms][PATCH 4/5] Silicon/RISC-V: remove redundant function code from RiscVCpuLib Date: Thu, 6 Apr 2023 13:24:22 +0800 Message-Id: <20230406052423.378702-5-evan.chai@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230406052423.378702-1-evan.chai@intel.com> References: <20230406052423.378702-1-evan.chai@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable They had been implemented in MdePkg/Library/BaseLib Cc: Daniel Schaefer Cc: Sunil V L Cc: Andrei Warkentin Signed-off-by: Evan Chai --- Silicon/RISC-V/ProcessorPkg/Include/Library/RiscVCpuLib.h | 20 +----------= --------- Silicon/RISC-V/ProcessorPkg/Library/RiscVCpuLib/Cpu.S | 41 +----------= ------------------------------ 2 files changed, 2 insertions(+), 59 deletions(-) diff --git a/Silicon/RISC-V/ProcessorPkg/Include/Library/RiscVCpuLib.h b/Si= licon/RISC-V/ProcessorPkg/Include/Library/RiscVCpuLib.h index efe85489..f1555843 100644 --- a/Silicon/RISC-V/ProcessorPkg/Include/Library/RiscVCpuLib.h +++ b/Silicon/RISC-V/ProcessorPkg/Include/Library/RiscVCpuLib.h @@ -2,6 +2,7 @@ RISC-V CPU library definitions.=0D =0D Copyright (c) 2016 - 2022, Hewlett Packard Enterprise Development LP. Al= l rights reserved.
=0D + Copyright (c) 2023, Intel Corporation. All rights reserved.
=0D =0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D **/=0D @@ -96,23 +97,4 @@ RiscVReadMachineImplementId ( VOID=0D );=0D =0D -VOID=0D - RiscVSetSupervisorAddressTranslationRegister (UINT64);=0D -=0D -VOID=0D - RiscVSetSupervisorScratch (UINT64);=0D -=0D -UINT64=0D -RiscVGetSupervisorScratch (=0D - VOID=0D - );=0D -=0D -VOID=0D - RiscVSetSupervisorStvec (UINT64);=0D -=0D -UINT64=0D -RiscVGetSupervisorStvec (=0D - VOID=0D - );=0D -=0D #endif=0D diff --git a/Silicon/RISC-V/ProcessorPkg/Library/RiscVCpuLib/Cpu.S b/Silico= n/RISC-V/ProcessorPkg/Library/RiscVCpuLib/Cpu.S index e242c9b8..52ef0788 100644 --- a/Silicon/RISC-V/ProcessorPkg/Library/RiscVCpuLib/Cpu.S +++ b/Silicon/RISC-V/ProcessorPkg/Library/RiscVCpuLib/Cpu.S @@ -3,6 +3,7 @@ // RISC-V CPU functions.=0D //=0D // Copyright (c) 2016 - 2021, Hewlett Packard Enterprise Development LP. A= ll rights reserved.
=0D +// Copyright (c) 2023, Intel Corporation. All rights reserved.
=0D //=0D // SPDX-License-Identifier: BSD-2-Clause-Patent=0D //=0D @@ -101,43 +102,3 @@ ASM_FUNC (RiscVReadMachineImplementId) csrr a0, RISCV_CSR_MACHINE_MIMPID=0D ret=0D =0D -//=0D -// Set Supervisor mode scratch.=0D -// @param a0 : Value set to Supervisor mode scratch=0D -//=0D -ASM_FUNC (RiscVSetSupervisorScratch)=0D - csrrw a1, RISCV_CSR_SUPERVISOR_SSCRATCH, a0=0D - ret=0D -=0D -//=0D -// Get Supervisor mode scratch.=0D -// @retval a0 : Value in Supervisor mode scratch=0D -//=0D -ASM_FUNC (RiscVGetSupervisorScratch)=0D - csrr a0, RISCV_CSR_SUPERVISOR_SSCRATCH=0D - ret=0D -=0D -//=0D -// Set Supervisor mode trap vector.=0D -// @param a0 : Value set to Supervisor mode trap vector=0D -//=0D -ASM_FUNC (RiscVSetSupervisorStvec)=0D - csrrw a1, RISCV_CSR_SUPERVISOR_STVEC, a0=0D - ret=0D -=0D -//=0D -// Get Supervisor mode scratch.=0D -// @retval a0 : Value in Supervisor mode trap vector=0D -//=0D -ASM_FUNC (RiscVGetSupervisorStvec)=0D - csrr a0, RISCV_CSR_SUPERVISOR_STVEC=0D - ret=0D -=0D -//=0D -// Set Supervisor Address Translation and=0D -// Protection Register.=0D -//=0D -ASM_FUNC (RiscVSetSupervisorAddressTranslationRegister)=0D - csrw RISCV_CSR_SUPERVISOR_SATP, a0=0D - ret=0D -=0D --=20 2.34.1