diff options
| author | Ada Christine <adachristine18@gmail.com> | 2025-01-27 02:05:07 +0000 |
|---|---|---|
| committer | Ada Christine <adachristine18@gmail.com> | 2025-01-27 02:05:07 +0000 |
| commit | 0d2ddecc9aeb232746b76b4eebdb1381053a8951 (patch) | |
| tree | 31fe2fc38ead88a0d982b06b3783aae4f094b8ad /service/kjarna.c | |
| parent | 6faeb8d3aed797ddfac66ecc21fc8a717d5e848a (diff) | |
checkpoint. we can fake syscall with the dummy gdt
Diffstat (limited to 'service/kjarna.c')
| -rw-r--r-- | service/kjarna.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/service/kjarna.c b/service/kjarna.c index 1240c97..ce9ec54 100644 --- a/service/kjarna.c +++ b/service/kjarna.c @@ -4,19 +4,15 @@ struct kjarna_entry_params *entry_params; extern int main(int argc, char **argv); -int kjarna_entry(struct kjarna_entry_params *params) +int kjarna_entry() { - entry_params = params; - - __asm__ ("leaq kc_image_base(%%rip), %%rax" ::: "rax"); + uint64_t image_base; + __asm__ ("leaq kc_image_base(%%rip), %0" : "=r"(image_base) :: ); bool wait = true; - while(wait) - { - __asm__ volatile("hlt"); - } + while(wait); - return main(params->argc, params->argv); + return main(0, nullptr); } |
