Home | History | Annotate | Download | only in libsa
History log of /src/sys/arch/x68k/stand/libsa/sdcd.c
RevisionDateAuthorComments
 1.19  07-Jan-2024  isaki TAB/space/indent cleanup.
 1.18  23-Jun-2022  isaki x68k/stand: Merge {sd,cd}strategy and {sd,cd}close respectively.
For sd and cd devs, only open differs and the rest is the same.
No functional changes intended.
Suggested by tsutsui@ at port-x68k.
 1.17  21-Jun-2022  isaki x68k/stand: Correct blocksize in case of CD.
- Fix calculation of the blocksize passes to SCSI IOCS.
- Use three kind of sector size (blocksize) properly; media's sector size,
DEV_BSIZE from xxstrategy, and Human68k's sector size.
By this change,
- For 512 bytes/sector HDD, no changes are intended.
- For CD, corrects the blocksize (%d5) passes to SCSI IOCS.
It has worked previously though the blocksize was incorrect. Now it
works with correct blocksize.
- As a secondary effect, 256 or 1024 bytes/sector media may work but not
well tested.
Reviewed by tsutsui@ at port-x68k.
 1.16  21-Jun-2022  isaki x68k/stand: Correct a condition expression.
- start is LBA but dblk is relative from this partition.
- The first term was wrong. It should be '(x & 0x1fffff) == x', but
it's more simple to use numerical comparison.
There would have been no impact.
 1.15  11-Feb-2014  tsutsui Specify default SCSI inquiry size (36 bytes) on IOCS_S_INQUIRY() command.

X680x0 SCSI IOCS stalls if SCSI device doesn't return inquiry data
of specified allocation length size on the INQUIRY command,
and it causes hangup on the XM6 based emulators that return only
upto 36 byte inquiry data on SCSI disk emulation.

Many real SCSI-2 hard drives seem to support >100 byte inquiry data,
but at least there is a harddisk that returns only supported inquiry
data size and quits transfer.

The bootloader checks only the device type and there is no reason
to read 100 bytes that includes vender specific data.

Analyzed and reported by GIMONS, a developer of XM6 TypeG emulator,
which also can run NetBSD/x68k.
 1.14  22-Nov-2012  tsutsui branches: 1.14.2;
Make sure to initialize partition offset in cdopen(),
i.e. fix an uninitialized auto variable which happened
to be zero on XM6i emulator.

Now cdboot also works on real X68030.
 1.13  19-Jun-2012  minoura branches: 1.13.2;
Fix CD support (again!).
 1.12  20-Mar-2012  minoura Fix CD support.
 1.11  17-Jul-2011  joerg branches: 1.11.2; 1.11.6; 1.11.8;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.10  09-Jul-2011  mrg don't assign sc->sc_partinfo.size to itself.
 1.9  11-Apr-2011  tsutsui Some KNF. No binary change.
 1.8  18-Nov-2007  isaki branches: 1.8.40; 1.8.46;
Use the same prototypes as libx68k.h.
 1.7  11-Nov-2007  isaki Style fix.
 1.6  25-Jan-2006  christos branches: 1.6.28; 1.6.46; 1.6.48; 1.6.52; 1.6.54;
free -> dealloc
unsigned -> size_t for alloc/dealloc
 1.5  07-Jan-2002  minoura branches: 1.5.2; 1.5.34; 1.5.46;
alloca() is now defined in libkern.h.
 1.4  15-Oct-2001  minoura branches: 1.4.4;
Prepare to set WARNS=2.
 1.3  15-Oct-2001  minoura set current_id properly.
 1.2  29-Sep-2001  minoura Implement ls command.
Correct bootdev detection.
Other minor changes.
 1.1  27-Sep-2001  minoura libsa for the new bootloader of x68k port.
 1.4.4.3  28-Feb-2002  nathanw Catch up to -current.
 1.4.4.2  11-Jan-2002  nathanw More catchup.
 1.4.4.1  15-Oct-2001  nathanw file sdcd.c was added on branch nathanw_sa on 2002-01-11 23:38:47 +0000
 1.5.46.1  01-Feb-2006  yamt sync with head.
 1.5.34.3  07-Dec-2007  yamt sync with head
 1.5.34.2  15-Nov-2007  yamt sync with head.
 1.5.34.1  21-Jun-2006  yamt sync with head.
 1.5.2.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.2.1  07-Jan-2002  thorpej file sdcd.c was added on branch kqueue on 2002-01-10 19:50:38 +0000
 1.6.54.1  19-Nov-2007  mjf Sync with HEAD.
 1.6.52.2  18-Nov-2007  bouyer Sync with HEAD
 1.6.52.1  13-Nov-2007  bouyer Sync with HEAD
 1.6.48.1  09-Jan-2008  matt sync with HEAD
 1.6.46.2  21-Nov-2007  joerg Sync with HEAD.
 1.6.46.1  11-Nov-2007  joerg Sync with HEAD.
 1.6.28.1  03-Dec-2007  ad Sync with HEAD.
 1.8.46.1  06-Jun-2011  jruoho Sync with HEAD.
 1.8.40.1  21-Apr-2011  rmind sync with head
 1.11.8.2  24-Nov-2012  jdc Pull up revisions:
src/sys/arch/x68k/stand/boot_ufs/boot.S revision 1.10
src/sys/arch/x68k/stand/boot/dp8390.c revision 1.2
src/sys/arch/x68k/stand/boot/dp8390.h revision 1.2
src/sys/arch/x68k/stand/boot/if_ne.c revision 1.2
src/sys/arch/x68k/stand/boot/ne.c revision 1.2
src/sys/arch/x68k/stand/libsa/clock.c revision 1.2
src/sys/arch/x68k/stand/netboot/Makefile revision 1.2
src/sys/arch/x68k/stand/netboot/boot.c revision 1.2
src/sys/arch/x68k/stand/netboot/conf.c revision 1.2
src/sys/arch/x68k/stand/bootlogo/MANIFEST delete
src/sys/arch/x68k/stand/bootlogo/netbsd.xpm delete
src/sys/arch/x68k/stand/bootlogo/setbootimg.c delete
src/sys/arch/x68k/stand/bootlogo/xpm2bootimg.c delete
src/sys/arch/x68k/stand/xxboot/boot.S revisions 1.2,1.3
src/sys/arch/x68k/stand/xxboot/bootmain.c revisions 1.2,1.3,1.4
src/sys/arch/x68k/stand/xxboot/xx.c revision 1.2
src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile revisions 1.2,1.3,1.4
src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile revisions 1.2,1.3,1.4
src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile revisions 1.2,1.3,1.4
src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile revisions 1.2,1.3,1.4
src/sys/arch/x68k/stand/xxboot/version revision 1.2
src/sys/arch/x68k/stand/xxboot/cdboot_cd9660/Makefile revision 1.2
src/sys/arch/x68k/stand/libsa/sdcd.c revision 1.14
(requested by tsutsui in ticket #707).

Fix typo in comment. s/d1/d0/

Remove my local RCS IDs.

Remove x68k/stand/bootlogo/ directory.
It was a tool before the bootloader becomes multi-stage (>10 years ago),
and it does not work anymore today.

Pull fixes in comments from x68k/stand/boot_ufs/boot.S rev 1.9 and 1.10.

Use a correct function name in .globl decl.

- fix comments
- use proper uintNN_t types
- use ANSI function decls
- remove unnecessary function decl
- remove __P()
- misc KNF and cosmetics

- use declarations in <lib/libsa/stand.h>
- remove __P() and some KNF
- remove extern variable decl
- use uintNN_t type

Set *file for FS_OPS() pathname properly in devopen().
Now bootxx_ffsv1 (and other bootxx ufs variants) work properly.

XXX: cd9660_open() in sys/lib/libsa/cd9660.c seems to open a file in
the first entry of root directory if specified path is empty.
Not sure if it's intentional behavoir.

Appease warning "nbmake: ${TOUCHPROG} expands to empty string".

Fix previous; no need to echo dummy command.

Make xxboot for ufs variants actually functional:
- set bootdev properly even on SCSI HD and floppy boot
per SDBOOT/FDBOOT/CDBOOT defines in each Makefile
- always print xxboot name and version
- use IOCS PRINT calls instead of printf to avoid size overflow in DEBUG case
- wrap debug stuff with #ifdef XXBOOT_DEBUG
- bump version to denote changes
Mostly taken from old boot_ufs.

XXX: xxboot_lfs[12] are untested.

Make sure to initialize partition offset in cdopen(),
i.e. fix an uninitialized auto variable which happened
to be zero on XM6i emulator.

Now cdboot also works on real X68030.
 1.11.8.1  18-Nov-2012  riz Pull up following revision(s) (requested by tsutsui in ticket #645):
sys/arch/x68k/stand/newdisk/newdisk.c: revision 1.10
sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile: revision 1.1
sys/arch/x68k/stand/xxboot/xx.c: revision 1.1
sys/arch/x68k/stand/Makefile: revision 1.10
sys/arch/x68k/stand/Makefile: revision 1.11
sys/arch/x68k/stand/boot/conf.c: revision 1.9
sys/arch/x68k/stand/Makefile: revision 1.12
sys/arch/x68k/stand/Makefile: revision 1.13
sys/arch/x68k/include/loadfile_machdep.h: revision 1.7
sys/arch/x68k/stand/xxboot/consio1.c: revision 1.1
sys/arch/x68k/stand/libsa/sdcd.c: revision 1.12
sys/arch/x68k/stand/libsa/libx68k.h: revision 1.6
sys/arch/x68k/stand/boot/ne.c: revision 1.1
sys/arch/x68k/stand/xxboot/boot.S: revision 1.1
sys/arch/x68k/stand/libsa/sdcd.c: revision 1.13
sys/arch/x68k/stand/netboot/boot.c: revision 1.1
sys/arch/x68k/stand/libsa/devopen.c: revision 1.6
sys/arch/x68k/stand/libsa/clock.c: revision 1.1
sys/arch/x68k/stand/boot/ne.h: revision 1.1
sys/arch/x68k/stand/netboot/conf.c: revision 1.1
sys/arch/x68k/stand/boot/version: revision 1.5
sys/arch/x68k/stand/boot/version: revision 1.6
sys/arch/x68k/stand/netboot/version: revision 1.1
sys/arch/x68k/stand/xxboot/Makefile.xxboot: revision 1.1
sys/arch/x68k/stand/boot/if_ne.c: revision 1.1
sys/arch/x68k/stand/boot/dp8390.h: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile: revision 1.1
sys/arch/x68k/stand/boot/dp8390.c: revision 1.1
sys/arch/x68k/stand/xxboot/bootmain.c: revision 1.1
sys/arch/x68k/stand/installboot/installboot.c: revision 1.6
sys/arch/x68k/stand/xxboot/conf.c: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile: revision 1.1
sys/arch/x68k/stand/libsa/Makefile.inc: revision 1.2
distrib/sets/lists/base/md.x68k: revision 1.44
sys/arch/x68k/stand/boot/conf.c: revision 1.10
sys/arch/x68k/stand/boot/boot.ldscript: revision 1.3
distrib/sets/lists/base/md.x68k: revision 1.45
sys/arch/x68k/stand/xxboot/xxboot.ldscript: revision 1.1
sys/arch/x68k/stand/xxboot/Makefile: revision 1.15
sys/arch/x68k/stand/libsa/Makefile: revision 1.29
sys/arch/x68k/stand/xxboot/cdboot_cd9660/Makefile: revision 1.1
sys/arch/x68k/stand/netboot/Makefile: revision 1.1
sys/arch/x68k/stand/libsa/consio.c: revision 1.10
sys/arch/x68k/stand/xxboot/version: revision 1.1
sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile: revision 1.1
Comment fix.
Add FFSv2 support.
Fix CD support.
Initial support for xxboot (cdboot_cd9660, specifically).
Add xxboot (stage1) support.
put library first.
Fix CD support (again!).
Descend to xxboot.
Add xxboot_?fsv?.
Change to the 2-clauses license.
Tweak SUBDIR build order and add comments about each dir.
Fix a bug in check_getchar() (called from awaitkey_1sec()).
It didn't clear input key data when non ASCII keys (CTRL, OPT.1 etc)
were pressed so it couldn't detect further key inputs and
"any other key for boot menu" interrupt during boot didn't work
in that case.
The problem was tracked by Y.Sugahara,
and tested on X68030 and XM6i by me.
Bump version to denote check_getchar() bug fix.
First cut at x68k network bootloader via NE2000 on Neptune-X and Nereid.
Written by isaki@ back in 2003 based on x86's NE2000 netboot, and
misc debug and improvements by tsutsui@ and Y.Sugahara.
Tested on XM6i (emulating Nereid Ethernet) and X68030 + Neptune-X by me,
also on X68030 + Nereid and X68000 PRO-II + Xellent30 + Nereid by isaki@.
Note:
- X680x0 IPLROM doesn't support bootstrap from Neptune-X or Nereid,
so this network bootloader needs to be loaded from floppy or harddisk.
- Currently netboot support is not merged into the secondary Multi-boot
(/usr/mdec/boot) due to size restriction.
- Primary loaders assumes that the secondary bootloader name is /boot,
so /usr/mdec/netboot needs to be installed as /boot into the target
bootstrap device.
Add new /usr/mdec/netboot.
Check lp->d_npartitions before calling dkcksum()
(which is in src/sbin/disklabel/dkcksum.c) because
it doesn't check range and could cause coredump during
installboot against floppy that includes garbage in LABELSECTOR.
 1.11.6.1  05-Apr-2012  mrg sync to latest -current.
 1.11.2.4  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.11.2.3  16-Jan-2013  yamt sync with (a bit old) head
 1.11.2.2  30-Oct-2012  yamt sync with head
 1.11.2.1  17-Apr-2012  yamt sync with head
 1.13.2.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.2.1  25-Feb-2013  tls resync with head
 1.14.2.1  18-May-2014  rmind sync with head

RSS XML Feed