aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/boot/entry64.s
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/src/boot/entry64.s')
-rw-r--r--arch/x86_64/src/boot/entry64.s14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/x86_64/src/boot/entry64.s b/arch/x86_64/src/boot/entry64.s
index 110ced8..c5df5db 100644
--- a/arch/x86_64/src/boot/entry64.s
+++ b/arch/x86_64/src/boot/entry64.s
@@ -10,10 +10,20 @@ _entry64:
mov %rax, %fs
mov %rax, %gs
- xor %rax, %rax
-
call invoke_global_constructors
+ xor %rax, %rax
+ mov %rax, %rbp
+ mov %rax, %rdx
+ mov %rax, %rsi
+
+ mov $stack_size, %rcx
+ shr $3, %rcx
+ lea (stack_bottom), %rdi
+ rep stosq
+
+ mov %rax, %rdi
+
call main
1: