| Age | Commit message (Collapse) | Author | Files | Lines |
|
* Add first version of tests for Krypto B Extension (Zbkb, Zbkc, Zbkx)
* Fix build of Zbkb/Zbkx tests
* Remove duplicate tests
* Fix bugs in packh, packw tests
---------
Co-authored-by: Furkan Aktas <f_rkan_aktas@proton.me>
|
|
|
|
Spike no longer supports the latter.
|
|
* isa: don't build 32bit if XLEN == 64
Only build 32bit binaries if XLEN != 64.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* isa: use API lp64d for XLEN=64
The standard ABI used on 64bit is lp64d.
With this change compilation on Ubuntu no longer complains
the missing include gnu/stubs-lp64.h.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---------
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
|
|
* benchmarks: illegal addend for R_RISCV_GOT_HI20 in crt.S
With Ubuntu's GCC 15.2.0-7ubuntu1 building results in an error:
/tmp/ccfCpSVm.o: in function `_start':
(.text.init+0x100): dangerous relocation:
The addend isn't allowed for R_RISCV_GOT_HI20
Split loading _end + 63 into register tp into separate load and add
instructions.
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc
only describes R_RISCV_GOT_HI20 with offset 0 to a label.
The topic of addends for R_RISCV_GOT_HI20 was discussed in
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/184#issuecomment-830988778
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* isa/rv64mi/illegal.S: illegal addend for R_RISCV_GOT_HI20
With Ubuntu's GCC 15.2.0-7ubuntu1 building results in an error:
rv64mi-p-illegal-illegal.o: in function `reset_vector':
(.text.init+0x1dc): dangerous relocation:
The addend isn't allowed for R_RISCV_GOT_HI20
Split loading mtvec_handler + 1 into register t into separate load and add
instructions.
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc
only describes R_RISCV_GOT_HI20 with offset 0 to a label.
The topic of addends for R_RISCV_GOT_HI20 was discussed in
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/184#issuecomment-830988778
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---------
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
|
|
When building with Ubuntu's gcc 15.2.0-7ubuntu1 an error occurs:
undefined reference to `__printf_chk'
This is due to _FORTIFY_SOURCE being set by the toolchain defaults.
Undefine the symbol.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
|
|
Building leads to a warning
riscv64-linux-gnu/bin/ld: warning:
median.riscv has a LOAD segment with RWX permissions
The text sections should we RX only.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
|
|
* benchmark: correct tohost, fromhost symbol size
Running on the spike virtual machine
qemu-system-riscv64 -M spike -nographic -bios none \
-kernel benchmarks/qsort.riscv
fails with
qemu-system-riscv64: HTIF tohost must be 8 bytes
because the symbol size if the ELF file is 0.
Move the symbols tohost and fromhost to C code.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* syscalls: QEMU only implements HTIF_CONSOLE_CMD_PUTC
The only console output syscall emulated by QEMU 10.2 via the HTIF
interface is writing a single character. String output is not available.
Rewrite printstr() as a loop using HTIF_CONSOLE_CMD_PUTC.
Rewrite putchar() using HTIF_CONSOLE_CMD_PUTC.
With this change the benchmarks provide output on the Spike virtual
machine:
$ qemu-system-riscv64 -M spike -nographic -bios none \
-kernel benchmarks/qsort.riscv
mcycle = 752216
minstret = 749734
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---------
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
|
|
Building benchmarks/common/syscalls.c results in a warning:
warning: format ‘%d’ expects argument of type ‘int’, but argument 4
has type ‘uintptr_t’ {aka ‘long unsigned int’} [-Wformat=]
118 | pbuf += sprintf(pbuf, "%s = %d\n", counter_names[i], counters[i]);
| ~^ ~~~~~~~~~~~
| | |
| int uintptr_t {aka long unsigned int}
Use %lu for to print uintptr_t.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
|
|
|
|
* debug: test S and U are supported for tdata1
Set MCONTROL_S and/or MCONTROL_U bits only if the hart supports S-mode
and/or U-mode.
Signed-off-by: Hiroo HAYASHI <24754036+hirooih@users.noreply.github.com>
* debug: test S is supported in TranslateTest
TranslateTest depends on the S extension being supported.
Without this change, the test fails on targets that do not support S
extension.
Signed-off-by: Hiroo HAYASHI <24754036+hirooih@users.noreply.github.com>
* debug: rename honors_tdata1_hmode to honors_tdata1_dmode
This is for the dmode bit in tdata1.
Signed-off-by: Hiroo HAYASHI <24754036+hirooih@users.noreply.github.com>
* debug: fixed obsoleted openocd-command names
This suppresses warnings like:
Warning: Command 'gdb_port' is deprecated, please use 'gdb port' instead.
Warning: Command 'tcl_port' is deprecated, please use 'tcl port' instead.
Warning: Command 'telnet_port' is deprecated, please use 'telnet port' instead.
from debug/README.md:
> openocd ..., which should be the latest from https://github.com/riscv/riscv-openocd.git.
Signed-off-by: Hiroo HAYASHI <24754036+hirooih@users.noreply.github.com>
* debug: not to throw exception on an expected error
This change makes debug/testlib.py not throw an exception
when an expected error occurs while creating the logs/ directory.
Fixing this is useful when debugging with python
debugger not to break at the exception every time.
Signed-off-by: Hiroo HAYASHI <24754036+hirooih@users.noreply.github.com>
* debug: call create() instead of target()
U500Sim.py is the only example of a target that uses VcsSim class.
It does not work without this fix.
Signed-off-by: Hiroo HAYASHI <24754036+hirooih@users.noreply.github.com>
* debug: VcsSim: make server start string configurable
example: for https://github.com/fjullien/jtag_vpi/blob/master/jtag_common.c#L80
def create(self):
return testlib.VcsSim(..., server_stared="^Starting jtag_vpi server:.*, port (\d+)/tcp")
Signed-off-by: Hiroo HAYASHI <24754036+hirooih@users.noreply.github.com>
---------
Signed-off-by: Hiroo HAYASHI <24754036+hirooih@users.noreply.github.com>
|
|
instruction (#636)
* debug: test implements_page_virtual_memory before executing sfence.vma instruction
cf. #537
Signed-off-by: Hiroo HAYASHI <24754036+hirooih@users.noreply.github.com>
* define exec_sfence_vma()
Signed-off-by: Hiroo HAYASHI <24754036+hirooih@users.noreply.github.com>
---------
Signed-off-by: Hiroo HAYASHI <24754036+hirooih@users.noreply.github.com>
|
|
This option is enabled by default (true). When set to false, it
disables the optional register 'abstractauto' by using the Spike
command option `--dm-no-abstractauto`.
|
|
|
|
|
|
|
|
|
|
rv64um: Add a new division test for a potential false-positive signed overflow case
|
|
Add Ziccid test
|
|
Requires latest Spike.
|
|
* macro: define [sq]NaN[dfh] and [n]Inf[dfh]
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
* apply sNaNf
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
* apply sNaNd
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
* apply qNaNd
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
* apply qNaNf
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
* apply sNaNh
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
* apply Infh
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
* apply nInfh
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
* apply Infd
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
* apply nInfd
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
* apply Inff
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
* apply nInff
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
---------
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Co-authored-by: liangzhen <zhen.liang@spacemit.com>
|
|
Resolves #614
|
|
Signed-off-by: Ariel Xiong <ArielHeleneto@outlook.com>
|
|
* Fix qNaN replacement in a more scalable way
* Fix sNaN replacement in same manner as qNaN
|
|
Test case 6 of both rv64ua-amomaxu_w and rv64ua-amominu_w test a rv64 specific
behaviour that the upper 32 bits must be ignored. This test does not apply for
rv32 and this commits disables these tests for rv32.
|
|
* Remove use of qNaN to fix LLVM build
* Remove use of sNaN to fix LLVM build
|
|
This adds a test for pmpaddr[G-1] edge cases. This bit is unusual because it has read legalisation that depends on another CSR.
If the pmpcfg mode is OFF/TOR then it reads as 0. Otherwise it reads as its underlying value. Irrespective of pmpcfg it is always writable so you can always write it even when it reads as zero.
Another edge case is when CSRS/C are used to modify a *different* bit and the underlying value of pmpaddr[G-1] is 1 but it reads as 0. The spec says "All CSR instructions atomically read-modify-write a single CSR" so even if these instructions don't directly modify pmpaddr[G-1] they do read it and then write it back, which will change its underlying value since it reads as 0.
|
|
See https://github.com/riscv/riscv-isa-manual/issues/1255
cc @Timmmm
|
|
|
|
|
|
Compile non-vec benchmarks for rv64gc
|
|
|
|
sequences. (#602)
|
|
(#600)
- Enhanced test_macros.h with TEST_LD_ST_BYPASS and TEST_ST_LD_BYPASS macros
to validate both load-store and store-load bypassing logic.
|
|
Dhrystone which are non-fatal warnings in GCC 13 but fatal errors in GCC 14 (#587)
|
|
|
|
* Create hypervisor
Signed-off-by: heiyuen1999 <110437689+heiyuen1999@users.noreply.github.com>
* Delete isa/hypervisor
Signed-off-by: heiyuen1999 <110437689+heiyuen1999@users.noreply.github.com>
* Create Makefrag
Signed-off-by: heiyuen1999 <110437689+heiyuen1999@users.noreply.github.com>
* Create 2-stage_translation.S
set 2-stage translation, do a simple load and store
Signed-off-by: heiyuen1999 <110437689+heiyuen1999@users.noreply.github.com>
* Update Makefile
add hypervisor to Makefile
Signed-off-by: heiyuen1999 <110437689+heiyuen1999@users.noreply.github.com>
* Update 2-stage_translation.S
fix some error
Signed-off-by: heiyuen1999 <110437689+heiyuen1999@users.noreply.github.com>
* Update 2-stage_translation.S
Signed-off-by: heiyuen1999 <110437689+heiyuen1999@users.noreply.github.com>
* Update Makefrag
Signed-off-by: heiyuen1999 <110437689+heiyuen1999@users.noreply.github.com>
* Update Makefile
Signed-off-by: heiyuen1999 <110437689+heiyuen1999@users.noreply.github.com>
* Modify address alignment
Modify address alignment to allow the page table to store 2048 entries
Signed-off-by: heiyuen1999 <110437689+heiyuen1999@users.noreply.github.com>
---------
Signed-off-by: heiyuen1999 <110437689+heiyuen1999@users.noreply.github.com>
|