[coreboot-gerrit] New patch to review for coreboot: [DO NOT MERGE] util/riscvtools: Provide a tohost symbol so Spike doesn't hang
Jonathan Neuschäfer (j.neuschaefer@gmx.net)
gerrit at coreboot.org
Tue Jun 21 19:45:25 CEST 2016
Jonathan Neuschäfer (j.neuschaefer at gmx.net) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15288
-gerrit
commit 4475d0d0a39e9686e43998f4d3072f74015a40ad
Author: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
Date: Tue Jun 21 19:37:04 2016 +0200
[DO NOT MERGE] util/riscvtools: Provide a tohost symbol so Spike doesn't hang
See https://github.com/riscv/riscv-isa-sim/issues/54 for more
information.
Change-Id: I8cda8dc07866d395eb3ce5d94df8232840fa8b82
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
---
util/riscvtools/htif.c | 2 ++
util/riscvtools/make-spike-elf.sh | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/util/riscvtools/htif.c b/util/riscvtools/htif.c
new file mode 100644
index 0000000..8615127
--- /dev/null
+++ b/util/riscvtools/htif.c
@@ -0,0 +1,2 @@
+#include <stdint.h>
+uint64_t tohost, fromhost;
diff --git a/util/riscvtools/make-spike-elf.sh b/util/riscvtools/make-spike-elf.sh
index 4241c54..aa2c767 100755
--- a/util/riscvtools/make-spike-elf.sh
+++ b/util/riscvtools/make-spike-elf.sh
@@ -23,5 +23,6 @@ ELF_FILE="$2"
TOOL_PATH="$(dirname "$0")"
objcopy -I binary -O elf32-i386 --binary-architecture i386 "$FLAT_FILE" "$OBJECT_FILE"
-ld -m elf_i386 "$OBJECT_FILE" -T "$TOOL_PATH/spike-elf.ld" -o "$ELF_FILE"
+clang -arch x86 -m32 -c "$TOOL_PATH/htif.c" -o "$TOOL_PATH/htif.o"
+ld -m elf_i386 "$OBJECT_FILE" "$TOOL_PATH/htif.o" -T "$TOOL_PATH/spike-elf.ld" -o "$ELF_FILE"
rm "$OBJECT_FILE"
More information about the coreboot-gerrit
mailing list