[PATCH] lib: Allow custom CSRs in csr_read_num() and csr_write_num()
Andrew Jones
ajones at ventanamicro.com
Tue Sep 30 08:47:17 PDT 2025
On Tue, Sep 30, 2025 at 09:02:16PM +0530, Anup Patel wrote:
> Some of the platforms use platform specific CSR access functions for
> configuring implementation specific CSRs (such as PMA registers).
>
> Extend the common csr_read_num() and csr_write_num() to allow custom
> CSRs so that platform specific CSR access functions are not needed.
>
> Signed-off-by: Anup Patel <apatel at ventanamicro.com>
> ---
> include/sbi/riscv_encoding.h | 34 ++++++++
> lib/sbi/riscv_asm.c | 135 ++++++++++++++++++-----------
> platform/generic/andes/andes_pma.c | 90 ++-----------------
> platform/generic/mips/p8700.c | 76 +---------------
> 4 files changed, 127 insertions(+), 208 deletions(-)
>
Reviewed-by: Andrew Jones <ajones at ventanamicro.com>
More information about the opensbi
mailing list