Meese
Posted: Fri May 20, 2005 7:04 pm
My mouse is not completely working. My kernel is currently in 3 stages.
1st: Bootstrap; enables A20; PMODE; loads 2nd.
2nd: IDT written to 0x8700; floppy driver loads 3rd; Init mouse; Paging; ect.
3rd: Rewrites IDT to 0x90000; GUI.
Now, we have two issues on our hands:
1. The mouse init routine only works right when I boot the second stage. Meaning, that it won't initialize the mouse if I put the same exact code much later in my program. Apparently the mouse expects the be initialized early in the boot process. BTW, it takes ~20 seconds from the time of the 2nd stage starting to the 3rd stage actually running. In summary: can the mouse only be initialized early in the boot?
2. IF I DO ENABLE the mouse in the 2nd stage, my mouse barfs after I rewrite my IDT. It doesn't send any more packets over the same exact interrupt. BTW, the interrupt, PIC, ect is working fine in all the stages AND the cascade, keyboard, mouse are unmasked AND the keyboard SHOULDN'T have sent any commands to be read.. I catch every byte sent from the keyboard.
So, how does this work? Is there some way I can turn off the mouse for my rewrite of the IDT? Could I simply 'Reset' the mouse after I start the 3rd stage?
And if I was to talk to the mouse, documentation is not very helpful and rather sparse. It's fairly hard to get a lot of info on this device.
Questions? Comments? Smart remarks?
Thanks,
Brett
1st: Bootstrap; enables A20; PMODE; loads 2nd.
2nd: IDT written to 0x8700; floppy driver loads 3rd; Init mouse; Paging; ect.
3rd: Rewrites IDT to 0x90000; GUI.
Now, we have two issues on our hands:
1. The mouse init routine only works right when I boot the second stage. Meaning, that it won't initialize the mouse if I put the same exact code much later in my program. Apparently the mouse expects the be initialized early in the boot process. BTW, it takes ~20 seconds from the time of the 2nd stage starting to the 3rd stage actually running. In summary: can the mouse only be initialized early in the boot?
2. IF I DO ENABLE the mouse in the 2nd stage, my mouse barfs after I rewrite my IDT. It doesn't send any more packets over the same exact interrupt. BTW, the interrupt, PIC, ect is working fine in all the stages AND the cascade, keyboard, mouse are unmasked AND the keyboard SHOULDN'T have sent any commands to be read.. I catch every byte sent from the keyboard.
So, how does this work? Is there some way I can turn off the mouse for my rewrite of the IDT? Could I simply 'Reset' the mouse after I start the 3rd stage?
And if I was to talk to the mouse, documentation is not very helpful and rather sparse. It's fairly hard to get a lot of info on this device.
Questions? Comments? Smart remarks?
Thanks,
Brett