summaryrefslogtreecommitdiff
path: root/lib/sbi/sbi_hart.c
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-02-18 09:07:16 +0300
committerAnup Patel <anup@brainfault.org>2020-02-19 07:28:45 +0300
commitbc874e34cecbd1e024ae7be4ec2f34d9cb1fbecb (patch)
tree4c373ca6f11d0d6f9f2fd9032ee8b90190563cb5 /lib/sbi/sbi_hart.c
parentc66543d049d33b94f1915babaed6eb1f90e05f78 (diff)
downloadopensbi-bc874e34cecbd1e024ae7be4ec2f34d9cb1fbecb.tar.xz
lib: Don't check MIDELEG and MEDELEG at end of delegate_traps()
The MIDELEG and MEDELEG CSR checks at end of delegate_traps() were added for initial bring-up on SiFive Unleashed and QEMU. These checks are not required any more and in-future these checks can cause failures because some of the MIDELEG/MEDELEG bits will be hard-wired to 0 or 1. For related discussion, refer github issue: https://github.com/riscv/opensbi/issues/157 Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib/sbi/sbi_hart.c')
-rw-r--r--lib/sbi/sbi_hart.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c
index dd2f99e..d83008f 100644
--- a/lib/sbi/sbi_hart.c
+++ b/lib/sbi/sbi_hart.c
@@ -104,11 +104,6 @@ static int delegate_traps(struct sbi_scratch *scratch, u32 hartid)
csr_write(CSR_MIDELEG, interrupts);
csr_write(CSR_MEDELEG, exceptions);
- if ((csr_read(CSR_MIDELEG) & interrupts) != interrupts)
- return SBI_EFAIL;
- if ((csr_read(CSR_MEDELEG) & exceptions) != exceptions)
- return SBI_EFAIL;
-
return 0;
}