Andrew Waterman
9c61d29846
Misaligned fetch exception is not mandatorily delegable
Harts with IALIGN=16 might hardwire this medeleg bit to 0.
6 months ago
mtravaillard
b4abf92e99
Add dtb into .data section in linker script ( #350 )
8 months ago
Liao Shihua
0239d921a2
Fix build failure when using gcc-15 ( #348 )
9 months ago
Andrew Waterman
02b1e2177a
Add exceedingly fake version of sys_getrandom
Resolves #344
11 months ago
Airat Galiamov
3d65181b12
Fixes #330 Set mstatus before querying uart ( #343 )
Co-authored-by: Airat Galiamov <DuzaBF@users.noreply.github.com>
11 months ago
Andrew Waterman
d8659a4e8e
Fix UB in RV32 versions of GET_F64_REG/SET_F64_REG
Resolves #342
1 year ago
Abraham Gonzalez
e5563d1044
Add no-op futex syscall implementation ( #341 )
1 year ago
Andrew Waterman
abadfdc507
Avoid dependence on asm ssp symbol
Resolves #336
1 year ago
Andrew Waterman
7f3bef0119
Enable CBOs (but upgrade inval to flush for safety)
2 years ago
Andrew Waterman
47a2e87ccd
Support CFI shadow stacks via --zicfiss command-line arg
2 years ago
hirooih
1a52fa44ab
README.md: add _zicsr_zifencei on configure option for rv32i ( #334 )
Signed-off-by: Hiroo HAYASHI <24754036+hirooih@users.noreply.github.com>
2 years ago
hirooih
1f5bcbe4d0
README.md: configure option for rv32ic ( #332 )
cf. https://github.com/riscv-software-src/riscv-isa-sim/issues/1361
Signed-off-by: Hiroo HAYASHI <24754036+hirooih@users.noreply.github.com>
2 years ago
Andrew Waterman
4f3debe4d0
Don't require software check exceptions be delegable
2 years ago
Andrew Waterman
54e2005dc8
Merge branch 'mylai-mtk-zicfilp-upstream'
2 years ago
Andrew Waterman
5ae7523adc
update encoding.h
2 years ago
Zixian Cai
8f7ba3cdce
Use kassert in load_elf ( #327 )
Signed-off-by: Zixian Cai <2891235+caizixian@users.noreply.github.com>
2 years ago
Andrew Waterman
9774e92186
support emulation of misaligned vector loads/stores
2 years ago
Andrew Waterman
10a0b7b1b0
Support emulation of misaligned FLH/FSH
2 years ago
Andrew Waterman
bd29db434d
Fix emulation of misaligned c.swsp/c.sdsp with rd=x0
2 years ago
Wojciech Muła
ab24ff2666
Implementation of riscv_hwprobe syscall from Linux ( #325 )
See: https://www.kernel.org/doc/html/latest/arch/riscv/hwprobe.html
2 years ago
Andrew Waterman
86ed1b3b06
mprotect whole ELF segment, not just file portion
2 years ago
Andrew Waterman
dd86101e71
Don't mmap ELF segments with zero filesz
2 years ago
Andrew Waterman
395f318f5e
Add ELF header sanity check
2 years ago
mylai-mtk
9388057c14
Implement syscall readlinkat and readv ( #318 )
* Implement syscall readlinkat
* Implement syscall readv by read syscalls
Since pk lacks kernel-space dynamic memory management, we implement readv with
normal read syscalls rather than forwarding it to spike
2 years ago
Andrew Waterman
ec17aa2453
Remove "bbl loader" message ( #313 )
It was originally added as a temporary hack to hide a race condition in
a prototype. It should've been removed long ago.
Resolves #312
2 years ago
Andrew Waterman
da80ada596
update encoding.h
2 years ago
Zixian Cai
aa570eb831
Use kassert in load_elf ( #327 )
Signed-off-by: Zixian Cai <2891235+caizixian@users.noreply.github.com>
2 years ago
Andrew Waterman
bfd4044f67
support emulation of misaligned vector loads/stores
2 years ago
Andrew Waterman
b190bef030
Support emulation of misaligned FLH/FSH
2 years ago
Andrew Waterman
fb9d13a695
Fix emulation of misaligned c.swsp/c.sdsp with rd=x0
2 years ago
Wojciech Muła
48e96c042d
Implementation of riscv_hwprobe syscall from Linux ( #325 )
See: https://www.kernel.org/doc/html/latest/arch/riscv/hwprobe.html
2 years ago
Andrew Waterman
6b5c8dbb6f
mprotect whole ELF segment, not just file portion
2 years ago
Andrew Waterman
c917315bf7
Don't mmap ELF segments with zero filesz
2 years ago
Andrew Waterman
1f326d6ed8
Add ELF header sanity check
2 years ago
mylai-mtk
9637e60b96
Implement syscall readlinkat and readv ( #318 )
* Implement syscall readlinkat
* Implement syscall readv by read syscalls
Since pk lacks kernel-space dynamic memory management, we implement readv with
normal read syscalls rather than forwarding it to spike
2 years ago
Ming-Yi Lai
a227544788
Zicfilp: Handle software check exception -- landing pad fault
2 years ago
Ming-Yi Lai
36019deb26
Add index comments to machine trap table to enhance code readability
2 years ago
Ming-Yi Lai
6c62461a1e
Zicfilp: Support enabling userspace Zicfilp mechanism
2 years ago
Ming-Yi Lai
3bd964f233
Zicfilp: Regenerate machine/encoding.h
2 years ago
Andrew Waterman
f03685954e
Remove "bbl loader" message ( #313 )
It was originally added as a temporary hack to hide a race condition in
a prototype. It should've been removed long ago.
Resolves #312
2 years ago
valentinThomazic
710c23a5bb
add support for "riscv-none-*" host name ( #309 )
2 years ago
Andrew Waterman
acbe166dac
Revert "[GCC]: Fix fence.i bug ( #296 )"
This reverts commit 54de960a5e .
See #298 for explanation.
3 years ago
Mark Goncharov
54de960a5e
[GCC]: Fix fence.i bug ( #296 )
There are many issues: 260, 285, 287 has to be solved
This workaround helps to add neccessary zicsr and
zifencei for cssr and fence.i accordingly.
3 years ago
xukl
8ce2dc424e
pk: fix __do_brk when new addr is not feasible ( #295 )
Linux kernel simply return current brk when request brk addr is not
feasible. The pk should probably do the same.
3 years ago
Andrew Waterman
3ed18cfbc7
Revert "Revert "SBI emulation of reads and writes to perf counters and config ( #98 )""
This reverts commit 7ae86fb97b .
This will continue to allow accesses to cycle/time via mcycle/mtime
despite https://github.com/riscv-software-src/riscv-isa-sim/pull/1297 .
The hope is this will keep most people happy while doing the right thing
with Spike.
3 years ago
Kenneth Ostby
573c858d90
Regenerated the configure file with autoconf 2.71 ( #288 )
Regenerated the configure file using autoconf 2.71 to avoid the Syntax
error problem when running on OSX/AArch64.
3 years ago
Andrew Waterman
7e9b671c04
Specify text section in rest_of_boot_loader definition
Fixes #282
4 years ago
MaxXing
2efabd3e66
Fix a file leak in function `at_kfd` ( #276 )
4 years ago
Lucheng Zhang
c7e75bf944
Link -lgcc if it exists
4 years ago
Andrew Waterman
ca69d69a30
Handle unimplemented syscalls gracefully
We previously kernel-panicked because that made it more obvious when a
syscall implementation was missing. These days, it's more common that
the C library will do something sensible in response to returning -ENOSYS.
Favor that approach to avoid frustrating users.
4 years ago