Enable A20.
This commit is contained in:
parent
7e678618d1
commit
e40bde036d
5
mbr.S
5
mbr.S
@ -54,8 +54,11 @@ bios_disk_read:
|
|||||||
|
|
||||||
|
|
||||||
switch_to_32bit:
|
switch_to_32bit:
|
||||||
|
mov $2, %al
|
||||||
|
out %al, $0x92 // enable A20
|
||||||
|
|
||||||
cli // 1. disable interrupts
|
cli // 1. disable interrupts
|
||||||
lgdt gdt_descriptor // 2. load GDT descriptor
|
lgdt gdt_descriptor // 2. load GDT descriptor
|
||||||
mov %cr0, %eax
|
mov %cr0, %eax
|
||||||
or $1, %eax // 3. enable protected mode
|
or $1, %eax // 3. enable protected mode
|
||||||
mov %eax, %cr0
|
mov %eax, %cr0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user