diff options
author | Anup Patel <anup.patel@wdc.com> | 2018-12-15 16:00:58 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2018-12-16 07:45:55 +0300 |
commit | 292e6344fac439196010f8d3f7b30da612b61921 (patch) | |
tree | b48580799b9a3afe4aee9a830d4fbaeeb0b94eb1 | |
parent | 9e8ff05cb61f157fb0bcb6b0071d7b6dc0763faa (diff) | |
download | opensbi-292e6344fac439196010f8d3f7b30da612b61921.tar.xz |
lib: Don't emulate CSR read for misa and mhartid
Emulation of CSR read for misa and mhartid was a workaround for
bootloader accessing these CSRs in S-mode. This patch removes
CSR read emulation for misa and mhartid.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
-rw-r--r-- | lib/sbi_emulate_csr.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/sbi_emulate_csr.c b/lib/sbi_emulate_csr.c index cc74f96..d073189 100644 --- a/lib/sbi_emulate_csr.c +++ b/lib/sbi_emulate_csr.c @@ -26,21 +26,6 @@ int sbi_emulate_csr_read(int csr_num, cen = csr_read(scounteren); switch (csr_num) { - case CSR_MISA: - *csr_val = csr_read(misa); - break; - case CSR_MVENDORID: - *csr_val = csr_read(mvendorid); - break; - case CSR_MARCHID: - *csr_val = csr_read(marchid); - break; - case CSR_MIMPID: - *csr_val = csr_read(mimpid); - break; - case CSR_MHARTID: - *csr_val = csr_read(mhartid); - break; case CSR_CYCLE: if (!((cen >> (CSR_CYCLE - CSR_CYCLE)) & 1)) return -1; |