Subject: Re: port-i386/14748 mbr_bootsel fixes
To: None <gnats-bugs@netbsd.org>
From: David Laight <David@l8s.co.uk>
List: port-i386
Date: 01/19/2002 00:42:01
I think I've finished fiddling with mbr_bootsel.S
The version here fixes port-i386/14748 (and probably port-i386/12401)

In addition:

1) Supports 'no timeout' - need new fdisk to set this
2) Displays a longer error message 'Error x', and redisplays the menu,
   with the timeout disabled.
   This will happen even if the 'bootselect' code is disabled.
3) Additional errors:
   ?: Invalid key press
   p: Selected partition not defined
4) Can now retry after a failure
5) Auto select between CHS reads and LBA reads
6) Input keys are checked properly (was doing signed tests!)
7) No longer explodes if %ch non-zero on entry
8) passes sector number of start of partition through to mbr code
9) there was probably at least one place where 0x00 0x00
   (add %al,[%bx+%si]) was executed (there isn't one at the moment!).

There are also quite a few bytes spare in this copy.  The only feature
I've removed is the retry loop on disk reads.

Number 8 is why I did the additional changes and allows the netbsd kernel
to find the 'correct' disklabel.

Since a diff is difficult to read - given the terse nature of this code.
The new file can be (probably) loaded from:
http://www.btinternet.com/~david.laight/netbsd/mbr_bootsel.S

    David