Home | History | Annotate | Download | only in boot
History log of /src/sys/arch/luna68k/stand/boot/sc.c
RevisionDateAuthorComments
 1.20  25-Sep-2024  rin luna68k/boot: XXX: Silence GCC12 -Warray-bounds for scident()

sensebuf and inqbuf may be uninitialized for some cases.

Real fix should be to check return values everywhere in
scsi_request_sense(), scsi_immed_command(), and functions
called from them.
 1.19  10-Dec-2021  andvar s/occured/occurred/ in comments, log messages and man pages.
 1.18  15-Jun-2021  tsutsui Fix off-by-one of a number of blocks of probed disks.

The SCSI READ_CAPACITY command returns the last logical data block
address, so we have to increment it to get a number of blocks
as src/sys/dev/scsipi/sd.c does.

Bump revision to denote the change.
 1.17  09-Feb-2018  jakllsch branches: 1.17.20;
Explain what may seem to be a non-sensical assignment, but isn't.

closes PR 53000
 1.16  31-Oct-2017  christos undo - pointed out this is a register assignment.
 1.15  31-Oct-2017  christos PR/52680: David Binderman: Remove dedundant assignment.
 1.14  14-Feb-2015  tsutsui Explicitly denote static functions.
 1.13  14-Feb-2015  tsutsui Misc KNF and cosmetics.
 1.12  14-Feb-2015  tsutsui Use proper signedness and exact-width interger types.
 1.11  16-Apr-2014  tsutsui branches: 1.11.4;
Appease gcc 4.8 -Wunused-but-set-variable warnings.
 1.10  11-Jan-2014  tsutsui branches: 1.10.2;
Misc KNF and cosmetics.
 1.9  10-Jan-2014  tsutsui Reorgenize boot device configuration. The idea is taken from OpenBSD/luna88k.

- remove kernel-like autoconfiguration to probe bootable devices
- initialize SCSI and Ethernet controllers statically instead
- reorganize device softc structures per autoconf removal
- probe and print all SCSI disks (but don't assign unit numbers)
- make sdopen() to recheck the device and allocate softc dynamically
- use controller number and SCSI target ID (ctlr * 10 + id) to specify
the boot disk on the "boot" command arg
- bump version to denote changes

Now bootloader works as the following:
---
>> NetBSD/luna68k boot, Revision 1.8 (Wed Jan 8 22:13:12 JST 2014)
>> (based on Stinger ver 0.0 [Phase-31])

Machine model = LUNA-II
Physical Memory = 0x4000000 (64 MB)

sc0 at 0xe1000000: async, parity, ID 7
ID 3: TEAC FC-1 HGF 10 rev , 512 bytes/sect x 2879 sectors
ID 6: IBM DPES-31080 rev S31Q, 512 bytes/sect x 2118143 sectors
sc1 at 0xe1000040: async, parity, ID 7
ID 6: MELCO DSC-G rev 1.00, 512 bytes/sect x 62533295 sectors
le0: Am7990 LANCE Ethernet, mem at 0x71010000
le0: Ethernet address = 00:00:0a:03:42:77

Press return to boot now, any other key for boot menu
booting sd(16,0)netbsd - starting in 0 seconds.
auto-boot sd(16,0)netbsd
1911696+96040 [280480+159179]=0x255a30
:
 1.8  03-Jan-2014  tsutsui Pull more cleanups from OpenBSD/luna88k:

- remove unused declarations
- rename struct scsi_fmt_cdb to scsi_generic_cdb
 1.7  02-Jan-2014  tsutsui Replace broken (by SCCS) ISO-2022-JP comments with UTF-8.

Recovered and decoded by isaki@.
 1.6  02-Jan-2014  tsutsui Add bound check of a controller number in scrun().

Noticed by miod@openbsd.
 1.5  02-Jan-2014  tsutsui Change the SCSI select timeout from 2ms to 250ms as kernel spc(4) driver does.

Noticed by miod@openbsd.
 1.4  22-Jan-2013  tsutsui branches: 1.4.2; 1.4.4; 1.4.6;
Whitespace cleanup.
 1.3  14-Jan-2013  tsutsui Fix drivers to make secondary SPC SCSI on LUNA-II work properly.
Also bump version.

Now we can load a NetBSD kernel from external SCSI disks on LUNA-II.
(and netboot on LUNA-II also works)
 1.2  13-Jan-2013  tsutsui Remove unused function members from struct driver.
This makes adding other drivers easier.
 1.1  05-Jan-2013  tsutsui First cut at NetBSD/luna68k native bootloader.

Based on 4.4BSD-Lite2/luna68k "Stinger" loader revision "Phase-31"
http://svnweb.freebsd.org/csrg/sys/luna68k/stand/
and MI libsa glue stuff are taken from hp300 etc.

Tested on LUNA-I and old DK315C SCSI disk drive.

LUNA's monitor PROM can load only an a.out binary in 4.3BSD FFS partition
(i.e. created by "newfs -O 0") on disks with OMRON's UniOS disklabel,
but now we can load an ELF kernel in root partition via this bootloader.
(See luna68k/disksubr.c for details of UniOS label)

TODO:
- LUNA-II support (check 68040 to adjust cpuspeed for DELAY())
- secondary SCSI support for LUNA-II
- netboot via le(4) (should be trivial)
- support boot options on bootloader prompt
- bootinfo (passing info about booted device and kernel symbols)
- support "press return to boot now, any other key for boot menu" method
like x86 bootloader (needs cnscan() like functions)
- tapeboot (anyone wants it?)
 1.4.6.4  03-Dec-2017  jdolecek update from HEAD
 1.4.6.3  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.6.2  25-Feb-2013  tls resync with head
 1.4.6.1  22-Jan-2013  tls file sc.c was added on branch tls-maxphys on 2013-02-25 00:28:49 +0000
 1.4.4.1  18-May-2014  rmind sync with head
 1.4.2.3  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.4.2.2  23-Jan-2013  yamt sync with head
 1.4.2.1  22-Jan-2013  yamt file sc.c was added on branch yamt-pagecache on 2013-01-23 00:05:54 +0000
 1.10.2.1  10-Aug-2014  tls Rebase.
 1.11.4.1  06-Apr-2015  skrll Sync with HEAD
 1.17.20.1  17-Jun-2021  thorpej Sync w/ HEAD.

RSS XML Feed