blob: 8231b3ee629c9804b479e428632cfc0a5a740b5d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
.code64
.set KERNEL_VMA, 0xffffffff80000000
.section .boot64.text, "a"
.global begin_long_mode
begin_long_mode:
mov $0x10, %ax
mov %ax, %ds
mov %ax, %es
mov %ax, %ss
mov %ax, %fs
mov %ax, %gs
add $KERNEL_VMA, %rsp
movabs $jump_main, %rax
jmp *%rax
.section .text
jump_main:
popq %rdi
popq %rsi
call kernel_main
hlt
|