History log of /src/sys/arch/hp300/dev/hpib.c |
Revision | | Date | Author | Comments |
1.45 |
| 15-Jan-2023 |
tsutsui | TAB/space cleanup.
|
1.44 |
| 07-Aug-2021 |
thorpej | branches: 1.44.6; Merge thorpej-cfargs2.
|
1.43 |
| 05-Jul-2021 |
tsutsui | branches: 1.43.2; Pull HP-IB probe fixes from OpenBSD/hp300.
https://marc.info/?l=openbsd-cvs&m=113217630426615&w=2 > Overhaul the way HP-IB devices are probed. We will now do an exhaustive > probe of the (slave, punit) tuple space, since this is the only way we > can get a dual disk or dual tape enclosure to attach two devices of the > same kind.
This allows using multiple rd(4) disk images on the same slave emulated by HPDisk (and probably the real 9122D with dual floppy disk drives).
Thanks to Miod Vallat for suggesting this fix.
|
1.42 |
| 24-Apr-2021 |
thorpej | branches: 1.42.2; Merge thorpej-cfargs branch:
Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments.
Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.)
Remove unnecessary or redundant interface attributes where they're not needed.
There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)
...and a sentinel value CFARG_EOL.
Add some extra sanity checking to ensure that interface attributes aren't ambiguous.
Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?).
|
1.41 |
| 18-Nov-2020 |
thorpej | branches: 1.41.2; malloc(9) -> kmem(9)
|
1.40 |
| 10-Nov-2019 |
chs | branches: 1.40.8; in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT and remove code to handle failures that can no longer happen.
|
1.39 |
| 13-Oct-2012 |
tsutsui | branches: 1.39.38; 1.39.42; struct device * -> device_t, struct cfdata * -> cfdata_t use device_xname() (from chs@)
|
1.38 |
| 13-Jun-2008 |
cegger | branches: 1.38.30; 1.38.40; use device_lookup_private to get softc
|
1.37 |
| 28-Apr-2008 |
martin | branches: 1.37.2; 1.37.4; Remove clause 3 and 4 from TNF licenses
|
1.36 |
| 29-Mar-2008 |
tsutsui | branches: 1.36.2; 1.36.4; Split device_t/softc, and misc cosmetic changes.
|
1.35 |
| 05-Dec-2007 |
tsutsui | branches: 1.35.12; Use queue(3) macro.
|
1.34 |
| 21-Jul-2006 |
tsutsui | branches: 1.34.32; 1.34.34; 1.34.40; 1.34.44; Some KNF.
|
1.33 |
| 28-Mar-2006 |
thorpej | Use device_unit().
|
1.32 |
| 19-Mar-2006 |
tsutsui | Replace MALLOC(9) with malloc(9) in non critical path.
|
1.31 |
| 11-Dec-2005 |
christos | branches: 1.31.4; 1.31.6; 1.31.8; 1.31.10; 1.31.12; merge ktrace-lwp.
|
1.30 |
| 26-Aug-2005 |
drochner | s/locdesc_t/int/g
|
1.29 |
| 04-Jul-2005 |
drochner | branches: 1.29.2; some autoconf cleanup fallout, leftover of last week, mostly from Havard Eidnes
|
1.28 |
| 19-Feb-2005 |
tsutsui | Include "ioconf.h" for struct cfdriver *_cd decls.
|
1.27 |
| 28-Aug-2004 |
thorpej | branches: 1.27.4; 1.27.6; Use ANSI function decls, static, and const.
|
1.26 |
| 17-Nov-2003 |
tsutsui | TAB/space cleanup.
|
1.25 |
| 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
|
1.24 |
| 01-Jan-2003 |
thorpej | branches: 1.24.2; Use aprint_normal() for cfprint routines.
|
1.23 |
| 02-Oct-2002 |
thorpej | Use CFATTACH_DECL().
|
1.22 |
| 27-Sep-2002 |
thorpej | Declare all cfattach structures const.
|
1.21 |
| 27-Sep-2002 |
thorpej | Introduce a new routine, config_match(), which invokes the cfattach->ca_match function in behalf of the caller. Use it rather than invoking cfattach->ca_match directly.
|
1.20 |
| 15-Mar-2002 |
gmcgarry | malloc cleanups: - malloc+memset -> malloc with M_ZERO - malloc -> MALLOC for fixed-sized structures Add RCSIDs while here
|
1.19 |
| 12-Jan-1998 |
thorpej | branches: 1.19.28; 1.19.32; Update for changes to config.
|
1.18 |
| 04-Oct-1997 |
thorpej | Copyright assigned to The NetBSD Foundation.
|
1.17 |
| 18-Jul-1997 |
jtk | branches: 1.17.2; remove old *_UNK style default defines, use standard names from locators.h
|
1.16 |
| 27-Apr-1997 |
thorpej | These files depend on things in <machine/hp300spu.h>
|
1.15 |
| 14-Apr-1997 |
thorpej | Remove unnecssary #include.
|
1.14 |
| 31-Mar-1997 |
scottr | Add prototypes, and make this compile with -Wall. Remove register modifier from all declarations.
|
1.13 |
| 30-Jan-1997 |
thorpej | - Convert these drivers to new-style autoconfiguration. Old-style configuration is no longer supported. - Use a much more obvious HP-IB job queueing scheme.
|
1.12 |
| 09-Dec-1996 |
thorpej | isrlink() now returns a cookie. We're not interested in the cookie, so cast to (void).
Call dmacomputeipl() after we've hooked up our interrupt handler.
|
1.11 |
| 13-Oct-1996 |
christos | backout previous kprintf changes
|
1.10 |
| 11-Oct-1996 |
christos | printf -> kprintf, sprintf -> ksprintf
|
1.9 |
| 17-May-1996 |
thorpej | Adjust for the new values of cpuspeed.
|
1.8 |
| 14-Feb-1996 |
thorpej | All interrupt routines (except the HIL; don't ask) now take a pointer to a softc, rather than a unit number. Add a "dq_softc" member to struct devqueue; this is a temporary measure until the dma/controller/device callback spaghetti is untangled.
YAY! No more need for dcafastservice!
HIL: squish instances of "(void) splhil()" and "(void) spl0();".
|
1.7 |
| 02-Dec-1995 |
thorpej | Use a "match/attach" rather than "init" scheme for probing devices. This is a step towards getting the drivers ready for new config.
|
1.6 |
| 19-Nov-1995 |
thorpej | Do an indirect driver a little more like an indirect driver would like to be done. Set up a structure filled with function pointers in the controller-specific probe routines, and jump through them, instead of if()'ing our way though each operation.
Be a little more discriptive; print out the controller type found during the probe in a way that's somewhat meaningful.
|
1.5 |
| 07-Jan-1995 |
mycroft | Various diffs from Mike Hibler; necessary for mt driver.
|
1.4 |
| 26-Oct-1994 |
cgd | new RCS ID format.
|
1.3 |
| 23-May-1994 |
mycroft | Merge with 4.4-Lite.
|
1.2 |
| 22-May-1993 |
cgd | add rcsids to everything and clean up headers
|
1.1 |
| 13-May-1993 |
cgd | branches: 1.1.1; Initial revision
|
1.1.1.1 |
| 13-May-1993 |
cgd | add hp300 kernel files. generic kernel files might need some help...
|
1.17.2.1 |
| 14-Oct-1997 |
thorpej | Update marc-pcmcia branch from trunk.
|
1.19.32.3 |
| 03-Jan-2003 |
thorpej | Sync with HEAD.
|
1.19.32.2 |
| 18-Oct-2002 |
nathanw | Catch up to -current.
|
1.19.32.1 |
| 01-Apr-2002 |
nathanw | Catch up to -current. (CVS: It's not just a program. It's an adventure!)
|
1.19.28.2 |
| 10-Oct-2002 |
jdolecek | sync kqueue with -current; this includes merge of gehenna-devsw branch, merge of i386 MP branch, and part of autoconf rototil work
|
1.19.28.1 |
| 23-Jun-2002 |
jdolecek | catch up with -current on kqueue branch
|
1.24.2.6 |
| 10-Nov-2005 |
skrll | Sync with HEAD. Here we go again...
|
1.24.2.5 |
| 04-Mar-2005 |
skrll | Sync with HEAD.
Hi Perry!
|
1.24.2.4 |
| 21-Sep-2004 |
skrll | Fix the sync with head I botched.
|
1.24.2.3 |
| 18-Sep-2004 |
skrll | Sync with HEAD.
|
1.24.2.2 |
| 03-Sep-2004 |
skrll | Sync with HEAD
|
1.24.2.1 |
| 03-Aug-2004 |
skrll | Sync with HEAD
|
1.27.6.1 |
| 19-Mar-2005 |
yamt | sync with head. xen and whitespace. xen part is not finished.
|
1.27.4.1 |
| 29-Apr-2005 |
kent | sync with -current
|
1.29.2.3 |
| 07-Dec-2007 |
yamt | sync with head
|
1.29.2.2 |
| 30-Dec-2006 |
yamt | sync with head.
|
1.29.2.1 |
| 21-Jun-2006 |
yamt | sync with head.
|
1.31.12.2 |
| 31-Mar-2006 |
tron | Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
|
1.31.12.1 |
| 28-Mar-2006 |
tron | Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
|
1.31.10.1 |
| 19-Apr-2006 |
elad | sync with head - hopefully this will work
|
1.31.8.2 |
| 11-Aug-2006 |
yamt | sync with head
|
1.31.8.1 |
| 01-Apr-2006 |
yamt | sync with head.
|
1.31.6.1 |
| 22-Apr-2006 |
simonb | Sync with head.
|
1.31.4.1 |
| 09-Sep-2006 |
rpaulo | sync with head
|
1.34.44.1 |
| 08-Dec-2007 |
ad | Sync with head.
|
1.34.40.1 |
| 08-Dec-2007 |
mjf | Sync with HEAD.
|
1.34.34.1 |
| 09-Jan-2008 |
matt | sync with HEAD
|
1.34.32.1 |
| 09-Dec-2007 |
jmcneill | Sync with HEAD.
|
1.35.12.3 |
| 29-Jun-2008 |
mjf | Sync with HEAD.
|
1.35.12.2 |
| 02-Jun-2008 |
mjf | Sync with HEAD.
|
1.35.12.1 |
| 03-Apr-2008 |
mjf | Sync with HEAD.
|
1.36.4.2 |
| 04-May-2009 |
yamt | sync with head.
|
1.36.4.1 |
| 16-May-2008 |
yamt | sync with head.
|
1.36.2.2 |
| 17-Jun-2008 |
yamt | sync with head.
|
1.36.2.1 |
| 18-May-2008 |
yamt | sync with head.
|
1.37.4.1 |
| 18-Jun-2008 |
simonb | Sync with head.
|
1.37.2.1 |
| 23-Jun-2008 |
wrstuden | Sync w/ -current. 34 merge conflicts to follow.
|
1.38.40.1 |
| 20-Nov-2012 |
tls | Resync to 2012-11-19 00:00:00 UTC
|
1.38.30.1 |
| 30-Oct-2012 |
yamt | sync with head
|
1.39.42.1 |
| 14-Jul-2021 |
martin | Pull up following revision(s) (requested by tsutsui in ticket #1323):
sys/arch/hp300/dev/rd.c: revision 1.109 sys/arch/hp300/stand/Makefile.buildboot: revision 1.37 sys/arch/hp300/stand/common/ct.c: revision 1.8 sys/arch/hp300/dev/hpibvar.h: revision 1.22 sys/arch/hp300/dev/ct.c: revision 1.62 sys/arch/hp300/dev/hpibvar.h: revision 1.23 sys/arch/hp300/dev/ct.c: revision 1.63 sys/arch/hp300/dev/hpibvar.h: revision 1.24 sys/arch/hp300/dev/mt.c: revision 1.55 sys/arch/hp300/dev/rdreg.h: revision 1.14 sys/arch/hp300/dev/hpib.c: revision 1.43 (via patch) sys/arch/hp300/dev/rdreg.h: revision 1.15 sys/arch/hp300/dev/rdreg.h: revision 1.16 sys/arch/hp300/dev/rdreg.h: revision 1.17 etc/etc.hp300/MAKEDEV.conf: revision 1.15 sys/arch/hp300/stand/common/hpibvar.h: revision 1.6 sys/arch/hp300/stand/common/rd.c: revision 1.11 sys/arch/hp300/dev/ctreg.h: revision 1.11 sys/arch/hp300/dev/rdvar.h: revision 1.24 sys/arch/hp300/dev/rdvar.h: revision 1.25 sys/arch/hp300/dev/rdvar.h: revision 1.26 sys/arch/hp300/dev/rd.c: revision 1.103 sys/arch/hp300/dev/rd.c: revision 1.104 sys/arch/hp300/dev/rd.c: revision 1.105 sys/arch/hp300/dev/rd.c: revision 1.106 sys/arch/hp300/dev/rd.c: revision 1.107 sys/arch/hp300/dev/rd.c: revision 1.108
Consistently use #define<tab> here.
Consistently use #define<tab> as rdreg.h.
No need to bother to use aprint_debug(9) inside #ifdef DEBUG block.
Pull HP-IB probe fixes from OpenBSD/hp300. https://marc.info/?l=openbsd-cvs&m=113217630426615&w=2
Overhaul the way HP-IB devices are probed. We will now do an exhaustive probe of the (slave, punit) tuple space, since this is the only way we can get a dual disk or dual tape enclosure to attach two devices of the same kind.
This allows using multiple rd(4) disk images on the same slave emulated by HPDisk (and probably the real 9122D with dual floppy disk drives).
Thanks to Miod Vallat for suggesting this fix.
Move attach messages from common rdident() to explicit rdattach().
Cleanup duplicated CS/80 indentify structures. From OpenBSD. https://marc.info/?l=openbsd-cvs&m=113227249626888&w=2
Define the CS/80 identify structure only once and correctly, instead of duplicating it in every CS/80 driver and using an hardcoded number for its size. No functional change. https://marc.info/?l=openbsd-cvs&m=113273001020159&w=2
Pick HP-IB describe structures changes from main kernel code here as well.
Add support of multiple rd(4) disks on all punits for HPDisk.
Special thanks to Anders Gustafsson, the author of "HPDisk" (GPIB disk emulator) http://www.dalton.ax/hpdisk/ for providing bare boards and improving firmwares for NetBSD/hp300.
Specify -fno-unwind-tables to shrink binaries.
Before: text data bss dec hex filename 77902 4328 137120 219350 358d6 uboot
After: text data bss dec hex filename 64186 4328 137120 205634 32342 uboot
Create rd3 device nodes, for HPDisk.
Add Device and drive info of 2202A, 7908A, 7911A, and 7941A.
Geometries and description info are taken from hpdrive.ini.sample in HPDrive. Briefly tested on HPDisk.
Print rd(4) capacity and geometry info as sd(4) and wd(4) do.
Before: rd0 at hpibbus1 slave 0 punit 0: 7937H rd0: 698 cylinders, 13 heads, 1116102 blocks, 512 bytes/block
After: rd0 at hpibbus1 slave 0 punit 0: 7937H rd0: 544 MB, 698 cyl, 13 head, 123 sec, 512 bytes/block x 1116102 blocks
|
1.39.38.1 |
| 13-Apr-2020 |
martin | Mostly merge changes from HEAD upto 20200411
|
1.40.8.1 |
| 14-Dec-2020 |
thorpej | Sync w/ HEAD.
|
1.41.2.6 |
| 05-Apr-2021 |
thorpej | Treat config_probe() as if it were a boolean function; don't compare return value > 0... except for the odd balls, which are now really easy to spot.
|
1.41.2.5 |
| 05-Apr-2021 |
thorpej | config_match() -> config_probe() for the straight-forward indirect config cases. There are still a few odd balls using config_match() which should be sorted out later.
|
1.41.2.4 |
| 04-Apr-2021 |
thorpej | CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
|
1.41.2.3 |
| 03-Apr-2021 |
thorpej | Give config_attach() the tagged variadic argument treatment and mechanically convert all call sites.
|
1.41.2.2 |
| 21-Mar-2021 |
thorpej | CFARG_IATTR usage audit:
If a device carries only one interface attribute, there is no need to specify it when calling config_search(); that specification is meant only to disambiguate which interface attribute (which is a proxy for "what kind of attach args are being used") is having children attached. cfparent_match() will take care of ensuring that any potential children can attach to one of the parent's iterface attributes, and if the parent only carries one, no disambiguation is necessary.
|
1.41.2.1 |
| 20-Mar-2021 |
thorpej | The proliferation if config_search_*() and config_found_*() combinations is a little absurd, so begin to tidy this up:
- Introduce a new cfarg_t enumerated type, that defines the types of tag-value variadic arguments that can be passed to the various config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS, for now, plus a CFARG_EOL sentinel). - Collapse config_search_*() into config_search() that takes these variadic arguments. - Convert all call sites of config_search_*() to the new signature. Noticed several incorrect usages along the way, which will be audited in a future commit.
|
1.42.2.1 |
| 01-Aug-2021 |
thorpej | Sync with HEAD.
|
1.43.2.1 |
| 04-Aug-2021 |
thorpej | Adapt to CFARGS().
|
1.44.6.1 |
| 22-Jun-2024 |
martin | Pull up following revision(s) (requested by tsutsui in ticket #722):
sys/fs/cd9660/cd9660_util.c: revision 1.16 sys/arch/hp300/stand/common/clock.c: revision 1.14 sys/arch/hp300/stand/common/scsireg.h: revision 1.5 sys/arch/hp300/stand/common/scsireg.h: revision 1.6 sys/arch/hp300/stand/Makefile.buildboot: revision 1.38 sys/arch/hp300/include/bus.h: revision 1.23 sys/arch/hp300/stand/Makefile.buildboot: revision 1.39 sys/arch/hp300/stand/common/sd.c: revision 1.12 sys/arch/hp300/stand/common/prf.c: revision 1.6 sys/arch/hp300/stand/common/sd.c: revision 1.13 usr.sbin/installboot/installboot.8: revision 1.106 usr.sbin/installboot/Makefile: revision 1.59 sys/arch/hp300/stand/common/devopen.c: revision 1.14 usr.sbin/installboot/installboot.8: revision 1.107 sys/arch/hp300/stand/common/ite_dumb.c: revision 1.2 sys/arch/hp300/stand/common/devopen.c: revision 1.15 usr.sbin/installboot/installboot.8: revision 1.108 sys/fs/cd9660/cd9660_extern.h: revision 1.29 usr.sbin/installboot/installboot.8: revision 1.109 tools/Makefile.nbincludes: revision 1.11 (patch) sys/arch/hp300/dev/rboxreg.h: revision 1.3 sys/arch/hp300/stand/common/scsivar.h: revision 1.5 sys/arch/hp300/dev/dnkbd.c: revision 1.14 sys/arch/hp300/hp300/trap.c: revision 1.156 sys/arch/hp300/stand/mkboot/mkboot.c: revision 1.12 sys/arch/hp300/dev/frodoreg.h: revision 1.6 sys/arch/hp300/stand/mkboot/mkboot.c: revision 1.13 sys/arch/hp300/stand/common/ite_sti.c: revision 1.2 sys/arch/hp300/stand/common/hil.c: revision 1.15 usr.sbin/installboot/arch/hp300.c: revision 1.18 sys/arch/hp300/stand/mkboot/mkboot.c: revision 1.14 sys/arch/hp300/dev/rbox.c: revision 1.4 usr.sbin/installboot/arch/hp300.c: revision 1.19 sys/arch/hp300/stand/mkboot/mkboot.c: revision 1.15 sys/sys/bootblock.h: revision 1.59 sys/arch/hp300/stand/mkboot/mkboot.c: revision 1.16 usr.sbin/installboot/installboot.h: revision 1.44 sys/arch/hp300/stand/mkboot/volhdr.h: file removal sys/arch/hp300/stand/mkboot/mkboot.c: revision 1.17 sys/arch/hp300/dev/hpib.c: revision 1.45 usr.sbin/installboot/installboot.h: revision 1.45 usr.sbin/installboot/cd9660.c: revision 1.1 sys/arch/hp300/stand/mkboot/mkboot.c: revision 1.18 sys/arch/hp300/dev/topcatreg.h: revision 1.3 usr.sbin/installboot/cd9660.c: revision 1.2 sys/arch/hp300/stand/mkboot/mkboot.c: revision 1.19 sys/arch/hp300/stand/inst/inst.c: revision 1.25 sys/arch/hp300/stand/uboot/Makefile: revision 1.12 sys/arch/hp300/dev/dvbox.c: revision 1.4 sys/arch/hp300/dev/dma.c: revision 1.45 sys/arch/hp300/stand/uboot/Makefile: revision 1.13 sys/arch/hp300/stand/common/rd.c: revision 1.16 sys/arch/hp300/stand/inst/Makefile: revision 1.12 distrib/hp300/cdroms/installcd/Makefile: revision 1.4 sys/arch/hp300/stand/mkboot/volhdr.h: revision 1.6 sys/arch/hp300/stand/common/machdep.c: revision 1.16 usr.sbin/installboot/fstypes.c: revision 1.14 sys/arch/hp300/hp300/machdep.c: revision 1.238 sys/arch/hp300/include/cpu.h: revision 1.73 sys/arch/hp300/dev/diofbreg.h: revision 1.4 sys/arch/hp300/stand/common/scsi.c: revision 1.12 sys/arch/hp300/stand/common/netio.c: revision 1.19 sys/arch/hp300/stand/common/scsi.c: revision 1.13 sys/arch/hp300/dev/sti_sgc.c: revision 1.8 sys/arch/hp300/dev/rtc.c: revision 1.22 sys/arch/hp300/stand/mkboot/mkboot.c: revision 1.20 sys/arch/hp300/stand/common/conf.h: revision 1.4 sys/arch/hp300/hp300/autoconf.c: revision 1.111 sys/arch/hp300/stand/common/conf.c: revision 1.15 sys/arch/hp300/stand/mkboot/Makefile: revision 1.12 sys/arch/hp300/stand/mkboot/Makefile: revision 1.13 sys/arch/hp300/hp300/autoconf.c: revision 1.114 sys/arch/hp300/dev/dcmreg.h: revision 1.11 sys/arch/hp300/dev/diofbvar.h: revision 1.4 sys/arch/hp300/dev/dcm.c: revision 1.91 sys/fs/cd9660/cd9660_util.c: revision 1.15 sys/arch/hp300/dev/mcclock_frodo.c: revision 1.2
TAB/space cleanup.
installboot(8): formatting improvements
Use Ar foo instead of <foo>; this is mdoc.
Other formatting tweaks. installboot(8): fix up markup
Don't overuse .Sy - when everything is highlighted, nothing is. Use .Ic for options &c to get correct PostScript output (both are bold in plain text).
Use Aq Ar inside .Pa, as both Pa and Ar are rendered as underscored text in plain text output, and the distinction is lost.
Don't set examples in bold, but give them .Pp space around - they are much easier to read this way.
Use consistent -width in FILES. document how to use installboot on netbsd/vax.
PR/57909: Jan-Benedict Glaw: Don't include (build) timestamp when doing a reproducible build fix usage string, improve error handling. add missing chunk for repro-build. fix gcc warnings. avoid stringop truncation, fix copyright string to prevent assembler warnings.
Fix build as a tool (Jan-Benedict Glaw)
Fix integer overflow of strtol(3) for "loadpoint" address on ILP32 hosts.
This strtol(3) was introduced in rev 1.12 for PR/57909 after netbsd-10, but it returns LONG_MAX (0x7FFFFFFF) for 0xFFF00000 on ILP32 hosts and the wrong loadpoint causes "NOT ENOUGH MEMORY" error by the BOOTROMs on loading uboot.lif on (at least) my 9000/360 and 9000/425t.
Misc cosmetic changes for mostly readability. - KNF and add some newlines per blocks - define and use proper bintobcd() macro - make local functions and variables static
The same uboot.lif binaries are generated.
Rename ${PROGAOUT} -> ${PROGELF} to reflect reality. Use proper signedness for the LIF file system data structures.
Ancient 4.3BSD used short and int for location, file size, file type, and addresses etc. but all of them should be unsigned.
Also rename several variables and add comments for readability. The LIF file system info can be found in "The HPDir Project" page: https://www.hp9845.net/9845/projects/hpdir/ The same uboot.lif binaries are generated.
Add a preliminary CD boot support to uboot for preparation of PR/54455. Briefly tested on mame, but not enalbed yet.
Recognize SCSI CD-ROM devices as a booted device properly.
Necessary for PR port-hp300/54455, to boot an md root root RAMDISK
kernel from CD-ROM without "WARNING: can't find match for bootdev:" prompt.
Sync with src/sys/arch/hp300/stand/mkboot/volhdr.h rev 1.6. https://mail-index.netbsd.org/source-changes/2024/05/07/msg151195.html
Use proper signedness for the LIF file system data structures. mkboot should use this MI <sys/bootblock.h> and volhdr.h should be removed soon.
Use MI <sys/bootblock.h> to refer LIF filesystem structures. This should have been done when LIF definitions were initially added to <sys/bootblock.h> for MI installboot(8).
Enable SUPPORT_CD on uboot.
Make cd9660_util.c usable in userland tools like installboot(8).
This was partially done for src/distrib/cdrom/macppc_installboot, but more strict prototypes are necessary for native binary builds.
Install cd9660 related system headers for tools installboot(8) builds.
Reorder function prototypes per source files.
Add cd9660 support to search a bootloader file in the target file system.
Also add CD boot support for hp300, using a bootloader file in cd9660 fs. This is a tool's part to close PR/54455.
HP 9000/300 machines read LIF directory entry allocated after the LIF volume header at the top of the boot disk during bootstrap, and a bootstrap file must be contiguously allocated on the disk due to limitation of the LIF specification.
Current NetBSD/hp300's bootloader is larger than ~80KB so we have to prepare a special 'boot' partition for FFS (that has only 8KB (ffsv1) or 32KB (ffsv2) spaces) disks to put such a large bootloader.
On the other hand, on ISO9660 fs all files are allocated contiguously so we can specify a bootloader file in the target ISO9660 directly in the LIF directory entry.
Note we can simply use the existing "append" option to create bootable CD ISO for hp300, but it looks some emulators (at leaset MAME) reject such non-standard ISO files, i.e. with an appended bootloader file at the end of the image.
Put a RAMDISK kernel and SYS_UBOOT into hp300 installcd to make it bootable.
This should finally close PR/54455.
Fix tools build errors on Cygwin.
Appease warnings on building tools/installboot on Cygwin.
|