Possible fix for Grub hotplug problem [needs testing]
I've modified doc_stage1.S to do the following:
o Copy the old interrupt handler (whether it be int 18 or 19) before overwriting it.
o The Grub int handler calls on the BIOS's int 16 to check whether the user is holding down the "ctrl" key.
o If he is, then the old handler is copied back in place and invoked.
o If he isn't, then the code continues on with loading the DOC.
I had to shorten the "msgjmp" string to get the code to still fit in 512 bytes. On a tangential note: given the 512 byte limitations it may be simpler get rid of any printout and output single chars, like lilo does when booting. The expensive string ops could then be left once we're out of the 512 bytes.
I haven't tested the code. Because my real-mode programming skills are somewhat rusty, I wanted someone else to take a look at it first in case I made a mistake somewhere. (I would usually test stuff before sending it off, but hotplugging my card isn't very appealing, hence the additional caution).
I've attached a bzip2'd copy of my modified doc_stage1.S. The code I added is surrounded by "#ifdef KEYBRD_READ" statements for easier reading.
Any comments and suggestions are greatly appreciated.
Karim
===================================================
Karim Yaghmour
[email protected]
Embedded and Real-Time Linux Expert
===================================================