It's (normally) only reasonable to launch Spike as a background process
when it's used in a mode that does not need stdin. But we should
support those use cases without hanging. Fix the hang by catching
SIGTTOU.
For obvious reasons, `spike -d` will still hang waiting for input
until it's in the foreground.
Fixes#2133
This applies when the binary is set to "none".
This is useful when implementing a binary loading
mechanism outside of the HTIF, and the bootloader
is supposed to boot from that.
Adds an optional --instructions=N CLI argument which will stop the simulation after N instructions.
This is useful for benchmarking and profiling and sometimes debugging.
When compiled as PIE, executable can be loaded at any memory address.
Lately, OpenSBI switched to such behavior and spike was not able to load
it anymore. This patch add an additional load_offset parameter for
load_elf(). This load_offset value is passed as DRAM_BASE and used only
for ET_DYN elfs.
Signed-off-by: Clément Léger <cleger@rivosinc.com>
Currently signal handler would call exit() only on second received
signal, this prevent proper program cleanup.
Instead use signal flag to exit loop.
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
It caused compile error "use of undeclared identifier 'errno'" at line 26 and 33.
I Add #include <cerrno> in fesvr/elfloader.cc to fix error and compile successfully.
This commit adds the *.pc files for Spike's simulation library,
enabling dynamic and static linking without the need to directly
reference Spike sources. Using Spike as a stand-alone library
provides an interesting option for developing tools
and applications based on Spike.
Compiling spike with gcc 13 (for example, included in Fedora 38
prerelease) fails with error:
In file included from fesvr/syscall.h:6,
from fesvr/syscall.cc:4:
fesvr/device.h:15:30: error: ‘uint64_t’ was not declared in this scope
15 | typedef std::function<void(uint64_t)> callback_t;
| ^~~~~~~~
This is due to a gcc header dependency change. See for reference:
https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
This commit explicitly adds the missing <cstdint> header inclusion
to fix this build failure.
Signed-off-by: Julien Olivain <ju.o@free.fr>
Delete the old branch and pull a new one, because of a wrong force push. Git is not as easy as I think.
Signed-off-by: gr816ox <50945677+gr816ox@users.noreply.github.com>