[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 05/11] target/riscv: Update CSR xip in CLIC mode
From: |
Ian Brockbank |
Subject: |
[PATCH 05/11] target/riscv: Update CSR xip in CLIC mode |
Date: |
Wed, 14 Aug 2024 09:27:35 +0100 |
From: Ian Brockbank <ian.brockbank@cirrus.com>
The xip CSR appears hardwired to zero in CLIC mode, replaced by separate
memory-mapped interrupt pendings (clicintip[i]). Writes to xip will be
ignored and will not trap (i.e., no access faults).
Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com>
Signed-off-by: Ian Brockbank <ian.brockbank@cirrus.com>
---
target/riscv/csr.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/target/riscv/csr.c b/target/riscv/csr.c
index a5978e0929..276ef7856e 100644
--- a/target/riscv/csr.c
+++ b/target/riscv/csr.c
@@ -2743,6 +2743,12 @@ static RISCVException rmw_mip(CPURISCVState *env, int
csrno,
uint64_t rval;
RISCVException ret;
+ /* The xip CSR appears hardwired to zero in CLIC mode. */
+ if (riscv_clic_is_clic_mode(env)) {
+ *ret_val = 0;
+ return RISCV_EXCP_NONE;
+ }
+
ret = rmw_mip64(env, csrno, &rval, new_val, wr_mask);
if (ret_val) {
*ret_val = rval;
@@ -3294,6 +3300,12 @@ static RISCVException rmw_sip64(CPURISCVState *env, int
csrno,
}
ret = rmw_vsip64(env, CSR_VSIP, ret_val, new_val, wr_mask);
} else {
+ /* The xip CSR appears hardwired to zero in CLIC mode. */
+ if (riscv_clic_is_clic_mode(env)) {
+ *ret_val = 0;
+ return RISCV_EXCP_NONE;
+ }
+
ret = rmw_mvip64(env, csrno, ret_val, new_val, wr_mask & mask);
}
--
2.46.0.windows.1
This message and any attachments may contain privileged and confidential
information that is intended solely for the person(s) to whom it is addressed.
If you are not an intended recipient you must not: read; copy; distribute;
discuss; take any action in or make any reliance upon the contents of this
message; nor open or read any attachment. If you have received this message in
error, please notify us as soon as possible on the following telephone number
and destroy this message including any attachments. Thank you. Cirrus Logic
International (UK) Ltd and Cirrus Logic International Semiconductor Ltd are
companies registered in Scotland, with registered numbers SC089839 and SC495735
respectively. Our registered office is at 7B Nightingale Way, Quartermile,
Edinburgh, EH3 9EG, UK. Tel: +44 (0)131 272 7000. www.cirrus.com
- [PATCH] target/riscv: Update interrupt handling in CLIC mode, (continued)
- [PATCH] target/riscv: Update interrupt handling in CLIC mode, Ian Brockbank, 2024/08/13
- [PATCH] target/riscv: Update CSR xnxti in CLIC mode, Ian Brockbank, 2024/08/13
- [PATCH] target/riscv: Update CSR xintthresh in CLIC mode, Ian Brockbank, 2024/08/13
- [PATCH] target/riscv: Update CSR xtvec in CLIC mode, Ian Brockbank, 2024/08/13
- [PATCH] target/riscv: Add CLIC CSR mintstatus, Ian Brockbank, 2024/08/13
- [PATCH 00/11] RISC-V: support CLIC v0.9 specification, Ian Brockbank, 2024/08/14
- [PATCH 03/11] hw/intc: Add CLIC device, Ian Brockbank, 2024/08/14
- [PATCH 02/11] target/riscv: Update CSR xintthresh in CLIC mode, Ian Brockbank, 2024/08/14
- [PATCH 01/11] target/riscv: Add CLIC CSR mintstatus, Ian Brockbank, 2024/08/14
- [PATCH 04/11] target/riscv: Update CSR xie in CLIC mode, Ian Brockbank, 2024/08/14
- [PATCH 05/11] target/riscv: Update CSR xip in CLIC mode,
Ian Brockbank <=
- [PATCH 07/11] target/riscv: Update CSR xnxti in CLIC mode, Ian Brockbank, 2024/08/14
- [PATCH 06/11] target/riscv: Update CSR xtvec in CLIC mode, Ian Brockbank, 2024/08/14
- RE: [PATCH 00/11] RISC-V: support CLIC v0.9 specification, Ian Brockbank, 2024/08/14