Subject: mbr_bootsel timer code incorrect.
To: None <email@example.com>
From: David Laight <David.Laight@btinternet.com>
Date: 11/27/2001 00:07:17
I've found a bug in the sbin/fdisk/mbr_bootsel/mbr_bootsel.S timeout code.
If you specify a timeout of 1801 or larger (in fdisk) then the timer
I'm fairly sure that the problem is either that the:
instruction will sign extend the 16bit value to 32 bits
or that the:
instruction is only doing a 16 bit compare and is followed by
a signed jump.
The code can also be simplified - saving some vital bytes!
If the sums are correctly done modulo 2^16 the high part of the
counter can be ignored.
I haven't test this - anyone who has done it before or feels brave?
(I suppose you can boot from CD to put the MBR back...)
But I think the following is right - assuming I've not mistyped it.
Hard to count how many bytes this saves...
I don't have a system that can reference the CVS tree.....
Anyone fancy the dirty work?