REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4076 Few of the basic helper functions required for any RISC-V CPU were added in edk2-platforms. To support qemu virt, they need to be added in BaseLib. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Daniel Schaefer <git@danielschaefer.me> Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> Acked-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Andrei Warkentin <andrei.warkentin@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
24 lines
621 B
ArmAsm
24 lines
621 B
ArmAsm
//------------------------------------------------------------------------------
|
|
//
|
|
// CPU scratch register related functions for RISC-V
|
|
//
|
|
// Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
|
|
//
|
|
// SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
//
|
|
//------------------------------------------------------------------------------
|
|
|
|
#include <Register/RiscV64/RiscVImpl.h>
|
|
|
|
.data
|
|
.align 3
|
|
.section .text
|
|
|
|
//
|
|
// Set Supervisor Address Translation and
|
|
// Protection Register.
|
|
//
|
|
ASM_FUNC (RiscVSetSupervisorAddressTranslationRegister)
|
|
csrw CSR_SATP, a0
|
|
ret
|