summaryrefslogtreecommitdiff
path: root/src/init
diff options
context:
space:
mode:
authordzwdz2021-08-11 15:57:21 +0000
committerdzwdz2021-08-11 15:57:21 +0000
commita32374156ea2cf129b413fa017d7e52e59570c04 (patch)
tree0d191308425e6bf376d539b4b77e9485b1cf8722 /src/init
parent0dbd5803e14d72b45ddae17e25bdd84308410f9a (diff)
read _syscall_debuglog arguments across page boundaries
Diffstat (limited to 'src/init')
-rw-r--r--src/init/main.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/init/main.c b/src/init/main.c
index 5615980..89f964f 100644
--- a/src/init/main.c
+++ b/src/init/main.c
@@ -1,13 +1,15 @@
#include <kernel/syscalls.h>
-int main() {
- _syscall_debuglog("hello from init! ",
- sizeof("hello from init! ") - 1);
-
- _syscall_fork();
+#define STR_64 "This string has exactly 64 characters. It'll be repeated a bunch"
+#define STR_256 STR_64 STR_64 STR_64 STR_64
+#define STR_1K STR_256 STR_256 STR_256 STR_256
+#define STR_4K STR_1K STR_1K STR_1K STR_1K
+#define STR_LNG "start " STR_4K STR_4K " finished! "
- _syscall_debuglog("i got forked. ",
- sizeof("i got forked. ") - 1);
+int main() {
+ // try to print a string which is longer than a page
+ _syscall_debuglog(STR_LNG,
+ sizeof(STR_LNG) - 1);
_syscall_exit("bye from init! ",
sizeof("bye from init! ") - 1);