bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

stage1.S patch for BIOS bug workaround


From: Michael Sullivan
Subject: stage1.S patch for BIOS bug workaround
Date: Sat, 15 Dec 2001 20:13:47 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011120

Here's a modification to stage1.S needed to work around an apparent
bug in AST BIOS release 1.04 on an AST Adventure! 415: the value of
register DL is 0 upon return from INT 13 function 41, leading to a
"GRUB Geom Error" because that causes subsequent disk operations to
be applied to the floppy rather than the hard disk.

I was using grub version 0.90 bundled with Red Hat 7.2, although the
patch included here was actually made against the current CVS version
(the only difference between them for stage1.S was a copyright
comment).

I don't know if it is worth making this change to the standard
distribution since there probably aren't many systems around with this
problem any more, but I wanted to share this information in case
anyone else does run into it.
--- stage1/stage1.S.old Wed Nov 14 21:29:31 2001
+++ stage1/stage1.S     Sat Dec 15 19:09:19 2001
@@ -148,6 +148,10 @@
        movw    $0x55aa, %bx
        int     $0x13
 
+       /* %dl may have been clobbered by the above int; restore it */
+       popw    %dx
+       pushw   %dx
+       
        /* use CHS if fails */
        jc      chs_mode
        cmpw    $0xaa55, %bx
2001-12-15  Michael Sullivan  <address@hidden>

        * stage1/stage1.S (real_start): Restore register DL in case it was
        clobbered by the BIOS.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]