diff options
| author | Anup Patel <[email protected]> | 2018-12-15 18:30:58 +0530 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2018-12-16 10:15:55 +0530 |
| commit | 292e6344fac439196010f8d3f7b30da612b61921 (patch) | |
| tree | b48580799b9a3afe4aee9a830d4fbaeeb0b94eb1 | |
| parent | 9e8ff05cb61f157fb0bcb6b0071d7b6dc0763faa (diff) | |
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 <[email protected]>
| -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 cc74f96b..d073189b 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; |
