summaryrefslogtreecommitdiff
path: root/kernel/src/boot/boot64.S
blob: cc79c364f44c4da03c6134c029765d2104eae457 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
.section .text
.code64

.global begin_long_mode
begin_long_mode:
	// reload segment registers
	mov $0x10, %ax
	mov %ax, %ds
	mov %ax, %es
	mov %ax, %ss
	mov %ax, %fs
	mov %ax, %gs

	popq %rdi
	popq %rsi
	call kernel_main
	hlt