Home | History | Annotate | Download | only in lib
History log of /src/sys/arch/i386/stand/lib/biosdisk_ll.c
RevisionDateAuthorComments
 1.31  21-Feb-2011  jakllsch Rework previous commit. Return non-zero instead of turning off
BIOSDISK_INT13EXT. BIOSDISK_INT13EXT also enables LBA access mechanisms
that we really want to be using if at all possible.
 1.30  21-Feb-2011  dyoung biosdisk_getextinfo() can fail. If it does fail in set_geometry(),
clear the flag BIOSDISK_INT13EXT so that a caller such as read_gpt()
will not try to rely on the gibberish in the biosdisk_extinfo.
 1.29  30-Dec-2010  jakllsch branches: 1.29.2; 1.29.4;
Make this actually build with DISK_DEBUG.
 1.28  25-Dec-2010  jakllsch Use printf format macros for long longs.
 1.27  24-Dec-2010  jakllsch Sprinkle daddr_t.
Adjust DISK_DEBUG printf formats to match.
 1.26  28-Apr-2008  martin branches: 1.26.14; 1.26.22;
Remove clause 3 and 4 from TNF licenses
 1.25  18-Nov-2006  erh branches: 1.25.52; 1.25.54; 1.25.56;
Add casts so this works with DISK_DEBUG defined.
 1.24  11-Dec-2005  christos branches: 1.24.20; 1.24.22;
merge ktrace-lwp.
 1.23  29-Jun-2005  junyoung branches: 1.23.2;
Massive renames for consistency:
biosdiskreset -> biosdisk_reset
biosread -> biosdisk_read
get_diskinfo -> biosdisk_getinfo
int13_extension -> biosdisk_int13ext
biosextread -> biosdisk_extread
int13_getextinfo -> biosdisk_getextinfo
struct biosdisk_ext13info -> biosdisk_extinfo
BIOSDISK_EXT13 -> BIOSDISK_INT13EXT
BIOSDISK_EXT13INFO_V{2,3} -> BIOSDISK_EXTINFO_V{2,3}
EXT13_* -> EXTINFO_*
 1.22  29-Jun-2005  junyoung get_diskinfo():
Return status code in bits [31:24] of %eax. 0 for success, otherwise failure.
 1.21  22-Jun-2005  junyoung Add support for cd9660 file system to the i386 BIOS bootloader.
 1.20  13-Jun-2005  junyoung ANSI, KNF, kill trailing spaces, and cosmetic changes.
 1.19  23-Aug-2004  junyoung Include libi386.h for function prototypes.
 1.18  25-Jun-2003  thorpej branches: 1.18.2;
Add a way to force (at compile time) use of int13 extensions.
 1.17  16-Apr-2003  dsl Use daddr_t for disk block numbers,
Set size of extended disk info structure in the C code
 1.16  02-Apr-2003  fvdl Add support for UFS2. UFS2 is an enhanced FFS, adding support for
64 bit block pointers, extended attribute storage, and a few
other things.

This commit does not yet include the code to manipulate the extended
storage (for e.g. ACLs), this will be done later.

Originally written by Kirk McKusick and Network Associates Laboratories for
FreeBSD.
 1.15  07-Feb-2003  dsl Use on-stack buffer to check for 2.88MB floppy, malloc() hasn't been
loaded when this is called.
Clearly the information is actually available from the bios.
(Approved by christos)
 1.14  01-Feb-2003  dsl Change all .S files to use .code16 and .code32
Support 32bit addresses >64k as valid on bios calls.
Move stack for dosboot and biosboot to >64 so stack doesn't hit data.
Use disk sector number passed by mbr code to select default partition
(the mbr code doesn't do this yet).
NB only biosboot and dosboot have been tested so far.
(changes approved by christos and fvdl)
 1.13  04-Dec-2002  jdolecek If booting from floppy in 2.88MB drive, actually test if it's possible
to read sector 18, and fallback to 1.44MB drive geometry if that fails.
This allows to boot from 1.44MB floppy disk in 2.88MB drive.
Tested with 2.88MB drive in IBM PS/2 model 95 donated
by 'Yokotashi' <lhc at kanal ucw cz> and Pavel Cahyna
<pavel.cahyna at st ms mff cuni cz>
Bump biosboot version.

Fixes PR kern/3418 by Keith Moore.

Change okayed by Frank van den Linden.
 1.12  10-Oct-2002  dyoung Introduce biosdiskreset(), and call it to reset the disk (with Int
0x13 Function 0) after a read error. This is a requirement mentioned
in most BIOS documentation.

This answers PR 18591.

Incidentally, on the Soekris Engineering net45x1 single-board
computer, this fixes a bug where the bootloader corrupts the kernel
while loading it from certain varieties of CompactFlash card
(especially varieties identified by NetBSD as <TOSHIBA THNCF064MBA>).
 1.11  07-Jul-2001  perry branches: 1.11.4; 1.11.18;
b*()->mem*()
 1.10  02-Nov-1999  drochner branches: 1.10.10;
correct debug printf() to make it compile with DISK_DEBUG again,
closes PR kern/8718 by Takahiro Kambe
 1.9  04-May-1999  fvdl branches: 1.9.2; 1.9.4; 1.9.6;
Restrict "out of CHS range" check to harddisks.
 1.8  28-Apr-1999  fvdl Only use int13 extensions if the sectors can not be read through the
older CHS interface. This works around stupid BIOSs who report that
int13 extensions are present and functional, but fail when you actually
use them. Like Adaptec SCSI BIOSs.
 1.7  30-Mar-1999  drochner branches: 1.7.2;
fix some disk handling problems introduced in the last commits:
-read retries were botched, use the right sector count
-read-ahead buffer was effectively unused
-concentrate the handling of the weird BIOS geometry report at one place
-fallback for old floppies left cylinder count uninitialized
 1.6  08-Mar-1999  fvdl * query BIOS geometry information, possibly using the int 13 extensions.
* pass them on to the kernel
* print a message if the 2nd stage bootloader returns (i.e. fails)
instead of just hanging.
 1.5  15-Oct-1998  ws Add int13 extension support
 1.4  23-Jul-1998  drochner retry disk accesses (for shaky floppy drives)
 1.3  13-Jun-1997  drochner Reformat comments. (messed up by "indent")
 1.2  22-Mar-1997  thorpej Purely cosmetic whitespace/indentation changes (mmm, indent(1))
 1.1  14-Mar-1997  perry branches: 1.1.1;
Initial revision
 1.1.1.1  14-Mar-1997  perry Initial import of new boot code, created by Matthias Drochner with a
little hacking by me. This isn't strictly identical to his 920312
release -- I've hacked it a bit -- but since we are taking over change
control it doesn't matter much.
 1.7.2.2  04-May-1999  perry branches: 1.7.2.2.2;
pullup 1.8->1.9 (fvdl)
 1.7.2.1  02-May-1999  perry pullup 1.7->1.8 (fvdl)
 1.7.2.2.2.1  21-Jun-1999  thorpej Sync w/ -current.
 1.9.6.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.4.1  15-Nov-1999  fvdl Sync with -current
 1.9.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.10.10.3  11-Dec-2002  thorpej Sync with HEAD.
 1.10.10.2  18-Oct-2002  nathanw Catch up to -current.
 1.10.10.1  24-Aug-2001  nathanw Catch up with -current.
 1.11.18.1  12-Jan-2003  jmc Pull up versions 1.12-1.13 (requested by jdolecek in ticket #1067)
If booting from floppy in 2.88MB drive, actually test if it's possible
to read sector 18, and fallback to 1.44MB drive geometry if that fails.
This allows to boot from 1.44MB floppy disk in 2.88MB drive.
Tested with 2.88MB drive in IBM PS/2 model 95 donated
by 'Yokotashi' <lhc at kanal ucw cz> and Pavel Cahyna
<pavel.cahyna at st ms mff cuni cz>
Bump biosboot version.

Fixes PR kern/3418 by Keith Moore.
 1.11.4.2  07-Jul-2001  perry b*()->mem*()
 1.11.4.1  07-Jul-2001  perry file biosdisk_ll.c was added on branch sommerfeld_i386mp_1 on 2001-07-07 22:57:58 +0000
 1.18.2.4  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.18.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.18.2.1  25-Aug-2004  skrll Sync with HEAD.
 1.23.2.1  30-Dec-2006  yamt sync with head.
 1.24.22.1  10-Dec-2006  yamt sync with head.
 1.24.20.1  12-Jan-2007  ad Sync with head.
 1.25.56.1  16-May-2008  yamt sync with head.
 1.25.54.1  18-May-2008  yamt sync with head.
 1.25.52.1  02-Jun-2008  mjf Sync with HEAD.
 1.26.22.1  05-Mar-2011  rmind sync with head
 1.26.14.2  28-Mar-2011  jym Sync with HEAD. TODO before merge:
- shortcut for suspend code in sysmon, when powerd(8) is not running.
Borrow ``xs_watch'' thread context?
- bug hunting in xbd + xennet resume. Rings are currently thrashed upon
resume, so current implementation force flush them on suspend. It's not
really needed.
 1.26.14.1  10-Jan-2011  jym Sync with HEAD
 1.29.4.1  05-Mar-2011  bouyer Sync with HEAD
 1.29.2.1  06-Jun-2011  jruoho Sync with HEAD.

RSS XML Feed