diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2025-09-15 15:51:13 -0400 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2025-09-15 15:51:13 -0400 |
commit | 5d73ba1059771f3226c1f45d41a9e3f52d68ee3d (patch) | |
tree | d1a93562ddff3810162d5180c3fe3cda58e24dad /apps/init/stage1/main.c | |
parent | 76ee61642d9d5c7d2abb8b92adec7ec59bd8791a (diff) | |
download | jove-os-main.tar.gz jove-os-main.tar.bz2 jove-os-main.zip |
begin init staging refactormain
Diffstat (limited to 'apps/init/stage1/main.c')
-rw-r--r-- | apps/init/stage1/main.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/apps/init/stage1/main.c b/apps/init/stage1/main.c new file mode 100644 index 0000000..90e663d --- /dev/null +++ b/apps/init/stage1/main.c @@ -0,0 +1,24 @@ +#include "stage1.h" +#include "kprint.h" +#include <kernel/init.h> + +uint8_t *_syscall_payload; +uint8_t _syscall_message; + +void main(void *init_message_ptr) +{ + _syscall_payload = init_message_ptr; + _syscall_message = INIT_OBJECT_MESSAGE; + + kputs("Hello, Userland!\n"); + for(;;); +} + +__attribute__((naked)) +void +_start(void) +{ + __asm__ volatile("\ + popq %rdi; \ + jmp main"); +} |