Wrote file, not really needed, though

This commit is contained in:
Gitea 2021-01-10 14:43:23 -06:00
parent d19b6f69e5
commit 36f5c39945
1 changed files with 21 additions and 0 deletions

21
arch/i386/pmode.S Normal file
View File

@ -0,0 +1,21 @@
.globl enter_pmode
.type enter_pmode,%function
enter_pmode:
.func enter_pmode
cli
mov %cr0, %eax
or $1, %eax
mov %eax, %cr0
ljmp $0x8, $pmode
.code32
pmode:
mov $0x10, %ax
mov %ax, %ds
mov %ax, %ss
mov %ax, %es
mov %ax, %fs
mov %ax, %gs
mov $0x90000, %esp
lret