summaryrefslogtreecommitdiff
path: root/service/kjarna.c
diff options
context:
space:
mode:
authorAda Christine <adachristine18@gmail.com>2025-01-27 02:05:07 +0000
committerAda Christine <adachristine18@gmail.com>2025-01-27 02:05:07 +0000
commit0d2ddecc9aeb232746b76b4eebdb1381053a8951 (patch)
tree31fe2fc38ead88a0d982b06b3783aae4f094b8ad /service/kjarna.c
parent6faeb8d3aed797ddfac66ecc21fc8a717d5e848a (diff)
checkpoint. we can fake syscall with the dummy gdt
Diffstat (limited to 'service/kjarna.c')
-rw-r--r--service/kjarna.c14
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);
}