aboutsummaryrefslogtreecommitdiff
path: root/dummy_payload/dummy_entry.S
diff options
context:
space:
mode:
Diffstat (limited to 'dummy_payload/dummy_entry.S')
-rw-r--r--dummy_payload/dummy_entry.S22
1 files changed, 22 insertions, 0 deletions
diff --git a/dummy_payload/dummy_entry.S b/dummy_payload/dummy_entry.S
new file mode 100644
index 0000000..92d4652
--- /dev/null
+++ b/dummy_payload/dummy_entry.S
@@ -0,0 +1,22 @@
+#include "mcall.h"
+
+ .section ".text.init"
+ .globl _start
+_start:
+ la s0, str
+1:
+ lbu a0, (s0)
+ beqz a0, 1f
+ li a7, SBI_CONSOLE_PUTCHAR
+ ecall
+ add s0, s0, 1
+ j 1b
+
+1:
+ li a7, SBI_SHUTDOWN
+ ecall
+
+ .data
+str:
+ .asciz "This is bbl's dummy_payload. To boot a real kernel, reconfigure\n\
+bbl with the flag --with-payload=PATH, then rebuild bbl.\n"