diff options
author | Jiri Gaisler <jiri@gaisler.se> | 2020-12-05 17:49:25 +0100 |
---|---|---|
committer | Jiri Gaisler <jiri@gaisler.se> | 2020-12-15 15:28:09 +0100 |
commit | 36b4b0a9b95a351fc99ca3224503dab9e29af865 (patch) | |
tree | 2364018e2cc1e3118672e841b84bc545caf316a8 /exec.c | |
parent | bb65f4484f9be1818435ca39e95feab35be427aa (diff) |
Added support for RISCV32 systems with CLINT/PLIC
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -136,12 +136,12 @@ init_regs (sregs) sregs[i].npc = 4; sregs[i].trap = 0; sregs[i].psr &= 0x00f03fdf; - if (cputype == CPU_LEON3) - sregs[i].psr |= 0xF3000080; /* Set supervisor bit */ + if (cputype == CPU_ERC32) + sregs[i].psr |= 0x11000080; /* Set supervisor bit */ else if (cputype == CPU_LEON2) sregs[i].psr |= 0x00000080; /* Set supervisor bit */ else - sregs[i].psr |= 0x11000080; /* Set supervisor bit */ + sregs[i].psr |= 0xF3000080; /* Set supervisor bit */ sregs[i].breakpoint = 0; sregs[i].fpstate = 0; sregs[i].fpqn = 0; @@ -163,12 +163,9 @@ init_regs (sregs) sregs[i].rett_err = 0; sregs[i].jmpltime = 0; - if (cputype == CPU_LEON3) - { - sregs[i].asr17 = 0x04000107 | (i << 28); - if (!nfp) - sregs[i].asr17 |= (3 << 10); /* Meiko FPU */ - } + sregs[i].asr17 = 0x04000107 | (i << 28); + if (!nfp) + sregs[i].asr17 |= (3 << 10); /* Meiko FPU */ sregs[i].cpu = i; sregs[i].simtime = 0; sregs[i].pwdtime = 0; |