Enable A20.

This commit is contained in:
Alexander Myltsev 2022-11-19 22:02:37 +03:00
parent 7e678618d1
commit e40bde036d

5
mbr.S
View File

@ -54,8 +54,11 @@ bios_disk_read:
switch_to_32bit:
mov $2, %al
out %al, $0x92 // enable A20
cli // 1. disable interrupts
lgdt gdt_descriptor // 2. load GDT descriptor
lgdt gdt_descriptor // 2. load GDT descriptor
mov %cr0, %eax
or $1, %eax // 3. enable protected mode
mov %eax, %cr0