summaryrefslogtreecommitdiff
path: root/kernel/boot64.S
blob: 561fe6b16fe1cc205087ca045e54f8e5376c2d49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
.global begin_long_mode

.section .text
.code64

begin_long_mode:
	// reload segment registers
	mov $0, %eax
	mov %eax, %ss
	mov %eax, %ds
	mov %eax, %es
	mov %eax, %fs
	mov %eax, %gs

	popq %rdi
	popq %rsi

	cli
	call kernel_main
	hlt