OSDN Git Service

target/riscv: Introduce privilege version field in the CSR ops.
authorAtish Patra <atishp@rivosinc.com>
Thu, 3 Mar 2022 18:54:37 +0000 (10:54 -0800)
committerAlistair Francis <alistair.francis@wdc.com>
Fri, 22 Apr 2022 00:35:16 +0000 (10:35 +1000)
commita4b2fa433125af0305b0695d7f8dda61db3364b0
treeafc9c6b462fa4363207dacd19208719c87c9a2d5
parent3a4af26d7a821b0299d25a2b002455899f1303ff
target/riscv: Introduce privilege version field in the CSR ops.

To allow/disallow the CSR access based on the privilege spec, a new field
in the csr_ops is introduced. It also adds the privileged specification
version (v1.12) for the CSRs introduced in the v1.12. This includes the
new ratified extensions such as Vector, Hypervisor and secconfig CSR.
However, it doesn't enforce the privilege version in this commit.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Message-Id: <20220303185440.512391-4-atishp@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/cpu.h
target/riscv/csr.c