summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--v/entry.S1
-rw-r--r--v/riscv_test.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/v/entry.S b/v/entry.S
index 9719662..e3b5a97 100644
--- a/v/entry.S
+++ b/v/entry.S
@@ -32,6 +32,7 @@ handle_reset:
slli t0, t0, 12
add sp, sp, t0
csrw mscratch, sp
+ call extra_boot
la a0, userstart
j vm_boot
diff --git a/v/riscv_test.h b/v/riscv_test.h
index 8ca9ffd..751e037 100644
--- a/v/riscv_test.h
+++ b/v/riscv_test.h
@@ -15,6 +15,10 @@
#undef RVTEST_CODE_BEGIN
#define RVTEST_CODE_BEGIN \
.text; \
+ .global extra_boot; \
+extra_boot: \
+ EXTRA_INIT \
+ ret; \
.global userstart; \
userstart: \
init