| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- /* arch/x86/init/head32.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 <https://www.gnu.org/licenses/>
- */
- .code32
- .globl _start
- _start:
- /* we are now in the protected-mode, just
- * do some initializes, and call main */
- lgdt gdt_descr
- movl $0xc0000000, %eax
- leal 1f, %ecx
- orl %ecx, %eax
- pushl %eax
- movl $0xc0000000, %eax
- leal init, %ecx
- orl %ecx, %eax
- pushl %eax
- retl
- 1: hlt
- jmp 1b
- .globl __stack_chk_fail
- __stack_chk_fail:
- hlt
- jmp __stack_chk_fail
- .data
- .align 16
- .globl gdt
- gdt: .long 0x00000000, 0x00000000
- .long 0x0000ffff, 0x00cf9a00
- .long 0x0000ffff, 0x00cf9200
- .globl gdt_descr
- gdt_descr:
- .word . - gdt
- .long gdt
|