redesign of the SCC bootloader
This commit is contained in:
parent
3729433b37
commit
31d14370c4
1 changed files with 0 additions and 42 deletions
|
@ -28,53 +28,11 @@ _start:
|
||||||
|
|
||||||
msg db "?ello from MetalSVM bootloader!!",0
|
msg db "?ello from MetalSVM bootloader!!",0
|
||||||
|
|
||||||
enable_A20:
|
|
||||||
call a20wait
|
|
||||||
mov al,0xAD
|
|
||||||
out 0x64,al
|
|
||||||
|
|
||||||
call a20wait
|
|
||||||
mov al,0xD0
|
|
||||||
out 0x64,al
|
|
||||||
|
|
||||||
call a20wait2
|
|
||||||
in al,0x60
|
|
||||||
push eax
|
|
||||||
|
|
||||||
call a20wait
|
|
||||||
mov al,0xD1
|
|
||||||
out 0x64,al
|
|
||||||
|
|
||||||
call a20wait
|
|
||||||
pop eax
|
|
||||||
or al,2
|
|
||||||
out 0x60,al
|
|
||||||
|
|
||||||
call a20wait
|
|
||||||
mov al,0xAE
|
|
||||||
out 0x64,al
|
|
||||||
|
|
||||||
call a20wait
|
|
||||||
ret
|
|
||||||
|
|
||||||
a20wait:
|
|
||||||
in al,0x64
|
|
||||||
test al,2
|
|
||||||
jnz a20wait
|
|
||||||
ret
|
|
||||||
|
|
||||||
a20wait2:
|
|
||||||
in al,0x64
|
|
||||||
test al,1
|
|
||||||
jz a20wait2
|
|
||||||
ret
|
|
||||||
|
|
||||||
_realstart:
|
_realstart:
|
||||||
; IRQs are already disabled by reset_vector
|
; IRQs are already disabled by reset_vector
|
||||||
; cli
|
; cli
|
||||||
|
|
||||||
lgdt [gdtr]
|
lgdt [gdtr]
|
||||||
; call enable_A20
|
|
||||||
|
|
||||||
; switch to protected mode by setting PE bit
|
; switch to protected mode by setting PE bit
|
||||||
mov eax, cr0
|
mov eax, cr0
|
||||||
|
|
Loading…
Add table
Reference in a new issue