Home | History | Annotate | Download | only in boot
History log of /src/sys/arch/cobalt/stand/boot/wdc.c
RevisionDateAuthorComments
 1.16  08-Jan-2019  christos no need for <machine/param.h>
 1.15  08-Jan-2019  christos Someone should merge all the wdc copies.
Include <sys/param.h> for DEV_BSIZE/DEV_BSHIFT
 1.14  03-Apr-2014  joerg branches: 1.14.28; 1.14.30;
GC found.
 1.13  19-Jan-2010  tsutsui branches: 1.13.12; 1.13.22; 1.13.26;
Use -DLIBSA_PRINTF_LONGLONG_SUPPORT -DLIBSA_PRINTF_WIDTH_SUPPORT
in debug printf()s.
 1.12  10-Jan-2010  tsutsui Add support for LBA48 read command to standalone wdc/wd driver.
Thanks to bouyer@ for comments about LBA48 boundary checks.

Tested on:
> Cobalt Qube 2700
> wd0 at atabus0 drive 0: <Hitachi HDS721616PLA380>
> wd0: 153 GB, 319120 cyl, 16 head, 63 sec, 512 bytes/sect x 321672960 sectors
via SATA-IDE converter, and NetBSD partition allocated at:
> 1: NetBSD (sysid 169)
> start 293603940, size 28069020 (13706 MB, Cyls 18276-20023/54/63)

Also bump version.
 1.11  28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.10  02-Mar-2008  tsutsui branches: 1.10.2; 1.10.4;
WARNSfy
 1.9  17-Oct-2007  garbled branches: 1.9.12; 1.9.16;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.8  03-Aug-2007  tsutsui branches: 1.8.2; 1.8.4;
Misc KNF and cosmetics.
 1.7  11-Dec-2005  christos branches: 1.7.24; 1.7.30; 1.7.38; 1.7.40; 1.7.42; 1.7.44;
merge ktrace-lwp.
 1.6  01-Sep-2004  tsutsui branches: 1.6.12;
- Adapt to the MI wdc driver changes which added the notion of
"shadow registers":
http://mail-index.netbsd.org/source-changes/2004/05/25/0048.html
- While here, also fix accesses to CTL regsters to use the correct address.

Now the cobalt bootloader works again.

XXX Maybe we should make this SA wdc driver MI...
 1.5  03-Jan-2004  thorpej Rename "struct channel_softc" to "struct wdc_channel".
 1.4  14-Dec-2003  tsutsui Change unit and part variables for wd from u_int8_t to u_int.
 1.3  10-Nov-2003  wiz Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
 1.2  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.1  25-Jun-2003  cdi branches: 1.1.2;
Initial commit of a 1-stage boot loader for NetBSD/cobalt. Only booting off
the hard drive is supported at the moment.
 1.1.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2  03-Sep-2004  skrll Sync with HEAD
 1.1.2.1  03-Aug-2004  skrll Sync with HEAD
 1.6.12.2  17-Mar-2008  yamt sync with head.
 1.6.12.1  03-Sep-2007  yamt sync with head.
 1.7.44.1  15-Aug-2007  skrll Sync with HEAD.
 1.7.42.1  07-Aug-2007  matt Sync with HEAD.
 1.7.40.1  03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.7.38.1  03-Oct-2007  garbled Sync with HEAD
 1.7.30.1  20-Aug-2007  ad Sync with HEAD.
 1.7.24.1  28-Aug-2007  liamjfoy Pull up following revision(s) (requested by tsutsui in ticket #843):
sys/arch/cobalt/stand/boot/pciide.c: revision 1.6
sys/arch/cobalt/cobalt/machdep.c: revision 1.85
sys/arch/cobalt/stand/boot/com.c: revision 1.5
sys/arch/cobalt/include/bootinfo.h: revision 1.5
sys/arch/cobalt/stand/boot/boot.c: revision 1.6
sys/arch/cobalt/stand/boot/boot.h: revision 1.4
sys/arch/cobalt/stand/boot/boot.c: revision 1.7
sys/arch/cobalt/stand/boot/boot.c: revision 1.8
sys/arch/cobalt/stand/boot/wdvar.h: revision 1.7
sys/arch/cobalt/stand/boot/wd.c: revision 1.6
sys/arch/cobalt/stand/boot/wd.c: revision 1.7
sys/arch/cobalt/stand/boot/prf.c: revision 1.2
sys/arch/cobalt/stand/boot/devopen.c: revision 1.2
sys/arch/cobalt/stand/boot/bootinfo.c: revision 1.3
sys/arch/cobalt/stand/boot/bootinfo.h: revision 1.3
sys/arch/cobalt/stand/boot/wdc.c: revision 1.8
sys/arch/cobalt/stand/boot/version: revision 1.3
sys/arch/cobalt/stand/boot/version: revision 1.4
sys/arch/cobalt/stand/boot/cons.c: revision 1.4
sys/arch/cobalt/stand/boot/ns16550.c: revision 1.2
sys/arch/cobalt/stand/boot/tgets.c: revision 1.3
sys/arch/cobalt/stand/boot/ns16550.h: revision 1.2
Add support for booting off raidframe RAID1 mirrors.

Misc KNF and cosmetics.

Parse boot_flags specified on boot prompt and
pass decoded boothowto value to kernel via bootinfo.

Lookup boothowto flags in bootinfo.

Parse "root=/dev/hdXN" args passed from the firmware and
set default boot device accordingly.
Requested and okay'ed by cyber@.
 1.8.4.2  23-Mar-2008  matt sync with HEAD
 1.8.4.1  06-Nov-2007  matt sync with HEAD
 1.8.2.2  03-Aug-2007  tsutsui Misc KNF and cosmetics.
 1.8.2.1  03-Aug-2007  tsutsui file wdc.c was added on branch jmcneill-pm on 2007-08-03 13:15:58 +0000
 1.9.16.2  02-Jun-2008  mjf Sync with HEAD.
 1.9.16.1  03-Apr-2008  mjf Sync with HEAD.
 1.9.12.1  24-Mar-2008  keiichi sync with head.
 1.10.4.2  11-Mar-2010  yamt sync with head
 1.10.4.1  16-May-2008  yamt sync with head.
 1.10.2.1  18-May-2008  yamt sync with head.
 1.13.26.1  18-May-2014  rmind sync with head
 1.13.22.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.12.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.14.30.1  10-Jun-2019  christos Sync with HEAD
 1.14.28.1  18-Jan-2019  pgoyette Synch with HEAD

RSS XML Feed