Possible fix for Grub hotplug problem [needs testing]

Karim Yaghmour karim at opersys.com
Sat Aug 10 17:47:22 EDT 2002


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
               karim at opersys.com
      Embedded and Real-Time Linux Expert
===================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: doc_stage1.S.bz2
Type: application/octet-stream
Size: 4726 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-mtd/attachments/20020810/79df282a/attachment.obj 


More information about the linux-mtd mailing list