I'm trying to get my toy-os working with GRUB since i want to use it on real hardware.
For this reason i implemented a multiboot header (as described here) and a minimal grub.cfg file.
All seems to works fine(IRSs and IRQs are correctly loaded) except for the keyboard driver:
for some reason i can't type nothing into the console.
The weird thing is that, without GRUB(loading the bootsector as a floppy image in QEMU), the keyboard driver works and i can type things on it.
Here on the forum i read that this can be a problem related with the GDT, but i've implemented it and it is loaded successfully before actually loading the kernel, and,as i said before,it works without QEMU.
What could be the cause of this problem?
If it can be helpful i post the source code of the GDT:
Code: Select all
gdt_start:
dd 0x0
dd 0x0
; code segment descriptor
gdt_code:
dw 0xffff
dw 0x0
db 0x0
db 10011010b
db 11001111b
db 0x0
; data segment descriptor
gdt_data:
dw 0xffff
dw 0x0
db 0x0
db 10010010b
db 11001111b
db 0x0 )
gdt_end:
gdt_descriptor:
dw gdt_end - gdt_start - 1 ; the size
dd gdt_start ; start address of the gdt
CODE_SEG equ gdt_code - gdt_start
DATA_SEG equ gdt_data - gdt_start