lkml.org 
[lkml]   [1998]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectfixes to arch/i386/boot/bootsect.S
Hello all,

Looking at arch/i386/boot/bootsect.S , just to see how much the Linux bootsector
does, I spotted two small things :

The part that copies the disk parameter table so that it can patch the sector count
makes use of register FS. This register only exists on 386 and up.. It means that the
bootsector will hang on a 8086/80286 without letting the chance to setup to be loaded
and eventually print an appropriate message. This hasn't been done in setup yet, and
the percentage of people who will try to boot a linux kernel on < 386 is very low,
but I know Linux programmers care about old hardware. So I rewrote that small
bit of the bootsector; while I was at it, I made it smaller and use less stack.. Gives
a few new extra bytes to stuff more things in ;)

The second problem is that I think the number of sectors isn't patched correctly :
it is modified relative to DS, not ES which is the segment where the memory copy
now is. It means that linux might not load from floppy properly on old bioses
that had a low number of sectors in the partition table (what that part of
the bootloader is about, in the first place). I fixed that too..

Since the diff is very small, I am attaching it gzipped to this email. This is in no way
a major fix, but problem #2 could be nasty; it makes the bootsector smaller and
work on all architectures, too.

Tell me what you think?

Emmanuel.

[unhandled content-type:application/x-gzip]
\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.159 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site