diff options
Diffstat (limited to 'kernel/boot.s')
| -rw-r--r-- | kernel/boot.s | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/kernel/boot.s b/kernel/boot.s index 8d07354..5050705 100644 --- a/kernel/boot.s +++ b/kernel/boot.s @@ -18,6 +18,7 @@ extern tty_init ; Multiboot header section .mboothdr +jmp kboot mboot_hdr: align 4 dd 0x1BADB002 @@ -44,10 +45,10 @@ kboot: call printk add esp, 4 ; initialize secondary subsystems + call timer_init call fs_init call tty_init ; last minute setup, then transfer to kmain - call timer_init call kmain ; if kmain decides to return (which it shouldn't), ; disable interrupts and halt the system. @@ -243,6 +244,14 @@ enable_a20: xchg ax, cx or al, 0x02 out 0x60, al + ; check if the gate is now enabled + call .testgate + jne .end + ; if the gate is still not working, try the fast-gate method + in al, 0x92 + and al, 0xFE + or al, 0x02 + out 0x92, al ; make sure the gate is working (panic if not) call .testgate jne .end @@ -272,7 +281,7 @@ enable_a20: pop ebp ret .tmp: dw 0xDEAD -.msg: db "Failed to enable A20 gate!", 10, 0 +.msg: db "Failed to enable the A20 gate!", 10, 0 pic_init: push ebp |
