/* arch/x86/init/head64.S * * This file is part of evx. * * evx is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * evx is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with evx. If not, see */ .code64 .globl _start _start: /* we are now in the long-mode, just * do some initializes, and call main */ lgdt gdt_descr(%rip) movq $0xffff800000000000, %rax leaq 1f(%rip), %rcx orq %rcx, %rax pushq %rax movq $0xffff800000000000, %rax leaq init(%rip), %rcx orq %rcx, %rax pushq %rax retq 1: hlt jmp 1b .data .align 16 .globl gdt gdt: .quad 0x0000000000000000 .quad 0x0020980000000000 .quad 0x0000920000000000 .globl gdt_descr gdt_descr: .word . - gdt .quad gdt