History log of /netbsd-current/sys/arch/i386/stand/lib/bootinfo_biosgeom.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.24 01-Aug-2019 manu

Fix buffer overflow in BIOS disk geometry collect for bootinfo

This spares a boot-time panic on iMac with fusion drive, which
feature both a hard drive and a solid-state drive.


Revision tags: netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204
# 1.23 24-Jan-2017 nonaka

branches: 1.23.6; 1.23.18;
Initial commit of native amd64 EFI boot loader.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.22 16-May-2013 christos

branches: 1.22.10; 1.22.14; 1.22.18;
Complete the dosparts -> mbrparts conversion. Only x86k new uses dosparts
because it also uses struct dos_partition.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 rmind-uvmplock-base jym-xensuspend-base
# 1.21 25-Dec-2010 jakllsch

branches: 1.21.8; 1.21.18;
Use printf format macros for long longs.


Revision tags: uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211
# 1.20 20-Nov-2009 dsl

branches: 1.20.4;
EXT13_DEVPATH_SIGNATURE should be EXTINFO_DEVPATH_SIGNATURE


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 netbsd-4-0-1-RELEASE wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-fixsa-newbase nick-csl-alignment-base5 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 matt-armv6-prevmlocking wrstuden-fixsa-base-1 vmlocking2-base3 netbsd-4-0-RELEASE bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 netbsd-4-0-RC5 matt-nb4-arm-base matt-armv6-nbase jmcneill-base netbsd-4-0-RC4 mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 wrstuden-fixsa-base ppcoea-renovation-base thorpej-atomic-base reinoud-bufcleanup-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base simonb-timcounters-final yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.19 11-Dec-2005 christos

branches: 1.19.78; 1.19.92;
merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.18 29-Jun-2005 junyoung

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.17 23-Jun-2005 junyoung

Define BIOSDISK_DEFAULT_SECSIZE in biosdisk_ll.h and replace BIOSDISK_SECSIZE
with it.


# 1.16 22-Jun-2005 junyoung

Use get_harddrives().


# 1.15 22-Jun-2005 junyoung

Add support for cd9660 file system to the i386 BIOS bootloader.


# 1.14 21-Jun-2005 junyoung

Cosmetic changes.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.13 24-Mar-2004 drochner

remove license clauses 3 and 4 from my cpoyright notices


# 1.12 08-Oct-2003 lukem

Overhaul MBR handling (part 1):

<sys/bootblock.h>:
* Added definitions for the Master Boot Record (MBR) used by
a variety of systems (primarily i386), including the format
of the BIOS Parameter Block (BPB).
This information was cribbed from a variety of sources
including <sys/disklabel_mbr.h> which this is a superset of.

As part of this, some data structure elements and #defines
were renamed to be more "namespace friendly" and consistent
with other bootblocks and MBR documentation.
Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
* Deprecated in favor of <sys/bootblock.h> (the latter is more
"host tool" friendly).

amd64 & i386:
* Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
be consistent with the naming convention of the msdosfs tools.

* Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
and it's confusing to have two functionally equivalent bootblocks,
especially given that "ufs" has multiple meanings (it could be
a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

* Rework pbr.S (the first sector of bootxx_*):
+ Ensure that BPB (bytes 11..89) and the partition table
(bytes 446..509) do not contain code.
+ Add support for booting from FAT partitions if BOOT_FROM_FAT
is defined. (Only set for bootxx_msdos).
+ Remove "dummy" partition 3; if people want to installboot(8)
these to the start of the disk they can use fdisk(8) to
create a real MBR partition table...
+ Compile with TERSE_ERROR so it fits because of the above.
Whilst this is less user friendly, I feel it's important
to have a valid partition table and BPB in the MBR/PBR.

* Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
with other platforms.

* Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
we can boot off FAT partitions.

* Crank version of /usr/mdec/boot to 3.1, and fix some of the other
entries in the version file.

installboot(8) (i386):
* Read the existing MBR of the filesystem and retain the BIOS
Parameter Block (BPB) in bytes 11..89 and the MBR partition
table in bytes 446..509. (Previously installboot(8) would
trash those two sections of the MBR.)

mbrlabel(8):
* Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).


# 1.11 16-Apr-2003 dsl

branches: 1.11.2;
Add code to parse V3.x bios disk information.
This should let NetBSD guarantee to tie together the bios disk numbers
with the physical hardware.
#defined out because I don't have a system with a bios that supports it.


# 1.10 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)


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 i386mp_plus16_stable netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base kqueue-base sommerfeld_i386mpnext sommerfeld_i386mpbase_1
# 1.9 07-Jul-2001 perry

branches: 1.9.4;
b*()->mem*()


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 thorpej_scsipi_beforemerge thorpej_scsipi_nbase netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-4-PATCH003 netbsd-1-5-ALPHA2 sommerfeld_i386mp_houseclean netbsd-1-5-base minoura-xpg4dl-base sommerfeld_i386mpbase_20000422 netbsd-1-4-PATCH002 chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base kame_141_19991130 comdex-fall-1999-base fvdl-softdep-base thorpej_scsipi_base netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.8 30-Mar-1999 drochner

branches: 1.8.22;
adapt to set_geometry change: we don't have to correct the geometry
anymore


# 1.7 28-Mar-1999 fvdl

Only use the total number of sectors information field from the EDD if
the bit is set that declares the geometry valid. The spec itself says
that this field isn't covered by the "geometry valid" bit, but at
least one BIOS implements it that way.


# 1.6 12-Mar-1999 fvdl

Clean up the BIOS disk matching code a bit (better naming, one structure
and sysctl to export to userland). Also, only use total number of sectors
given in the extended parameters if the physical chs geometry is
marked invalid. Hopefully fixes a problem where BIOSs would not correctly
fill in this field.


# 1.5 11-Mar-1999 fvdl

Declare nhd to be unsigned char, as we're only copying one byte to it.
From Matthias Drochner.


# 1.4 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.3 28-Jan-1999 christos

Minor changes to prototypes.


# 1.2 27-Jan-1999 thorpej

Use the MI <sys/disklabel_mbr.h>, not our own machine-dependent
definitions.


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 kenh-if-detach-base netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 chs-ubc-base eeh-paddr_t-base netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base marc-pcmcia-base
# 1.1 17-Sep-1997 drochner

branches: 1.1.2;
Function to collect geometry and partitioning information about the
BIOS-known disks in a "bootinfo" structure (still experimental).


# 1.23 24-Jan-2017 nonaka

Initial commit of native amd64 EFI boot loader.


Revision tags: netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base tls-maxphys-base
# 1.22 16-May-2013 christos

Complete the dosparts -> mbrparts conversion. Only x86k new uses dosparts
because it also uses struct dos_partition.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 rmind-uvmplock-base jym-xensuspend-base
# 1.21 25-Dec-2010 jakllsch

branches: 1.21.8; 1.21.18;
Use printf format macros for long longs.


Revision tags: uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211
# 1.20 20-Nov-2009 dsl

branches: 1.20.4;
EXT13_DEVPATH_SIGNATURE should be EXTINFO_DEVPATH_SIGNATURE


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 netbsd-4-0-1-RELEASE wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-fixsa-newbase nick-csl-alignment-base5 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 matt-armv6-prevmlocking wrstuden-fixsa-base-1 vmlocking2-base3 netbsd-4-0-RELEASE bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 netbsd-4-0-RC5 matt-nb4-arm-base matt-armv6-nbase jmcneill-base netbsd-4-0-RC4 mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 wrstuden-fixsa-base ppcoea-renovation-base thorpej-atomic-base reinoud-bufcleanup-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base simonb-timcounters-final yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.19 11-Dec-2005 christos

branches: 1.19.78; 1.19.92;
merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.18 29-Jun-2005 junyoung

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.17 23-Jun-2005 junyoung

Define BIOSDISK_DEFAULT_SECSIZE in biosdisk_ll.h and replace BIOSDISK_SECSIZE
with it.


# 1.16 22-Jun-2005 junyoung

Use get_harddrives().


# 1.15 22-Jun-2005 junyoung

Add support for cd9660 file system to the i386 BIOS bootloader.


# 1.14 21-Jun-2005 junyoung

Cosmetic changes.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.13 24-Mar-2004 drochner

remove license clauses 3 and 4 from my cpoyright notices


# 1.12 08-Oct-2003 lukem

Overhaul MBR handling (part 1):

<sys/bootblock.h>:
* Added definitions for the Master Boot Record (MBR) used by
a variety of systems (primarily i386), including the format
of the BIOS Parameter Block (BPB).
This information was cribbed from a variety of sources
including <sys/disklabel_mbr.h> which this is a superset of.

As part of this, some data structure elements and #defines
were renamed to be more "namespace friendly" and consistent
with other bootblocks and MBR documentation.
Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
* Deprecated in favor of <sys/bootblock.h> (the latter is more
"host tool" friendly).

amd64 & i386:
* Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
be consistent with the naming convention of the msdosfs tools.

* Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
and it's confusing to have two functionally equivalent bootblocks,
especially given that "ufs" has multiple meanings (it could be
a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

* Rework pbr.S (the first sector of bootxx_*):
+ Ensure that BPB (bytes 11..89) and the partition table
(bytes 446..509) do not contain code.
+ Add support for booting from FAT partitions if BOOT_FROM_FAT
is defined. (Only set for bootxx_msdos).
+ Remove "dummy" partition 3; if people want to installboot(8)
these to the start of the disk they can use fdisk(8) to
create a real MBR partition table...
+ Compile with TERSE_ERROR so it fits because of the above.
Whilst this is less user friendly, I feel it's important
to have a valid partition table and BPB in the MBR/PBR.

* Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
with other platforms.

* Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
we can boot off FAT partitions.

* Crank version of /usr/mdec/boot to 3.1, and fix some of the other
entries in the version file.

installboot(8) (i386):
* Read the existing MBR of the filesystem and retain the BIOS
Parameter Block (BPB) in bytes 11..89 and the MBR partition
table in bytes 446..509. (Previously installboot(8) would
trash those two sections of the MBR.)

mbrlabel(8):
* Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).


# 1.11 16-Apr-2003 dsl

branches: 1.11.2;
Add code to parse V3.x bios disk information.
This should let NetBSD guarantee to tie together the bios disk numbers
with the physical hardware.
#defined out because I don't have a system with a bios that supports it.


# 1.10 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)


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 i386mp_plus16_stable netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base kqueue-base sommerfeld_i386mpnext sommerfeld_i386mpbase_1
# 1.9 07-Jul-2001 perry

branches: 1.9.4;
b*()->mem*()


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 thorpej_scsipi_beforemerge thorpej_scsipi_nbase netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-4-PATCH003 netbsd-1-5-ALPHA2 sommerfeld_i386mp_houseclean netbsd-1-5-base minoura-xpg4dl-base sommerfeld_i386mpbase_20000422 netbsd-1-4-PATCH002 chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base kame_141_19991130 comdex-fall-1999-base fvdl-softdep-base thorpej_scsipi_base netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.8 30-Mar-1999 drochner

branches: 1.8.22;
adapt to set_geometry change: we don't have to correct the geometry
anymore


# 1.7 28-Mar-1999 fvdl

Only use the total number of sectors information field from the EDD if
the bit is set that declares the geometry valid. The spec itself says
that this field isn't covered by the "geometry valid" bit, but at
least one BIOS implements it that way.


# 1.6 12-Mar-1999 fvdl

Clean up the BIOS disk matching code a bit (better naming, one structure
and sysctl to export to userland). Also, only use total number of sectors
given in the extended parameters if the physical chs geometry is
marked invalid. Hopefully fixes a problem where BIOSs would not correctly
fill in this field.


# 1.5 11-Mar-1999 fvdl

Declare nhd to be unsigned char, as we're only copying one byte to it.
From Matthias Drochner.


# 1.4 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.3 28-Jan-1999 christos

Minor changes to prototypes.


# 1.2 27-Jan-1999 thorpej

Use the MI <sys/disklabel_mbr.h>, not our own machine-dependent
definitions.


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 kenh-if-detach-base netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 chs-ubc-base eeh-paddr_t-base netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base marc-pcmcia-base
# 1.1 17-Sep-1997 drochner

branches: 1.1.2;
Function to collect geometry and partitioning information about the
BIOS-known disks in a "bootinfo" structure (still experimental).