qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 02/16] target/riscv: Introduce elp state and enabling cont


From: Richard Henderson
Subject: Re: [PATCH v4 02/16] target/riscv: Introduce elp state and enabling controls for zicfilp
Date: Fri, 16 Aug 2024 12:56:13 +1000
User-agent: Mozilla Thunderbird

On 8/16/24 11:06, Deepak Gupta wrote:
zicfilp introduces a new state elp ("expected landing pad") in cpu.
During normal execution, elp is idle (NO_LP_EXPECTED) i.e not expecting
landing pad. On an indirect call, elp moves LP_EXPECTED. When elp is
LP_EXPECTED, only a subsquent landing pad instruction can set state back
to NO_LP_EXPECTED. On reset, elp is set to NO_LP_EXPECTED.

zicfilp is enabled via bit2 in *envcfg CSRs. Enabling control for M-mode
is in mseccfg CSR at bit position 10.

On trap, elp state is saved away in *status.

Signed-off-by: Deepak Gupta<debug@rivosinc.com>
Co-developed-by: Jim Shu<jim.shu@sifive.com>
Co-developed-by: Andy Chiu<andy.chiu@sifive.com>
---
  target/riscv/cpu.c      |  3 +++
  target/riscv/cpu.h      |  2 ++
  target/riscv/cpu_bits.h |  6 ++++++
  target/riscv/csr.c      | 31 +++++++++++++++++++++++++++++++
  target/riscv/pmp.c      |  5 +++++
  target/riscv/pmp.h      |  3 ++-
  6 files changed, 49 insertions(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]