-
-
Save heatd/16be0f9ce2dba386cf86e557ba0a6efa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.section .reset16,"ax" | |
.code16 | |
reset_vector2: | |
ljmpw $0xf000, $1f | |
1: | |
lgdtl %cs:gdtr | |
mov %cr0, %eax | |
or $1, %al | |
mov %eax, %cr0 | |
ljmpl $0x8, $SecEntry | |
gdtr: | |
.word 40 | |
.long gdt | |
.section .reset_vector,"ax" | |
.code16 | |
.global reset_vector | |
reset_vector: | |
jmp . - 0xff0 | |
.rept 13 | |
nop | |
.endr | |
.section .text | |
SecEntry: | |
cli | |
hlt | |
.section .rodata | |
gdt: | |
.quad 0x0000000000000000 | |
.quad 0x00CF9A000000FFFF | |
.quad 0x00CF92000000FFFF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment