Home | History | Annotate | Download | only in vsa
History log of /src/sys/arch/vax/vsa/dz_vsbus.c
RevisionDateAuthorComments
 1.51  04-Mar-2025  hans vax/dz(4): fix NULL pointer dereference in dzgetc()

This fixes an immediate reboot situation when booting with -d on a
framebuffer console that utilizes a dz(4)-attached keyboard.
 1.50  04-Mar-2025  hans vax/dz(4): defer configuring children lkkbd and lkms

At least lkkdb (dzkbd, really) wants to not only send data over dz(4),
it also depends on receiving them asynchronously for the keyboard type
detection to work. So defer configuring dz(4) children until all vsbus
children have attached and vsbus interrupts have been unmasked.

This fixes keyboard type detection when running with serial console,
which on most (all?) VAXstations is on dz(4), too.
 1.49  02-Mar-2025  hans vax/dz(4): restore dz_print() to print line number of children
 1.48  02-Mar-2025  hans vax/dz(4): fix console detection when it's not on line 0
 1.47  12-Dec-2022  jakllsch branches: 1.47.2;
vsbus vax: sprinkle volatile for register accesses
 1.46  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.45  24-Apr-2021  thorpej branches: 1.45.8;
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.44  22-May-2017  ragge branches: 1.44.24;
Update copyright notice for Ludd (remove clause 3 & 4).
 1.43  28-Jun-2012  abs branches: 1.43.2; 1.43.16;
Define and use VS_REGS_KA49 rather than magic numbers. From OpenBSD.
 1.42  14-Dec-2010  matt branches: 1.42.8;
Cleanup includes. Switch from <machine/XXX.h> to <sys/XXX.h> from
bus, cpu, and intr. Remove unneeded includes.
 1.41  09-May-2010  hans Make console keyboard work on VAXstation 4000/9x. Seems not to break
anything on other VAXstations (tested on 4000 VLC).
 1.40  15-Mar-2008  matt branches: 1.40.4; 1.40.14; 1.40.24; 1.40.26;
Switch dz driver to PRIVALLOC and device_* accessors.
 1.39  11-Mar-2008  matt Rototill the vax code. Switch to devicet/PRIV_ALLOC. Cleanup vax autoconf
code. Move to prototype definitions. staticfy, constify, avoid casting.
Use device_* accessors.
 1.38  07-Mar-2008  christos Fix KA53 console. From Hans Rosenfeld.
 1.37  12-Mar-2006  matt branches: 1.37.40; 1.37.60; 1.37.64;
Fix various places where assignment happen to casted lvalues.
(t)v = foo; is not legal C.
 1.36  11-Dec-2005  christos branches: 1.36.4; 1.36.6; 1.36.8; 1.36.10;
merge ktrace-lwp.
 1.35  14-Dec-2004  chs branches: 1.35.10;
use the generated macros in locators.h rather than hard-coded numbers
to index the cf_loc[] array. reviewed by allen briggs.
 1.34  13-Dec-2003  ad Add write barriers (a no-op on vax).
 1.33  18-Oct-2003  ragge Use the vax confdata to determine whether to use serial console.
Do cn_set_magic() for the VAX DDB escape sequence (ESC-D).
 1.32  15-Jul-2003  lukem __KERNEL_RCSID()
 1.31  01-Jan-2003  thorpej branches: 1.31.2;
Use aprint_normal() for cfprint routines.
 1.30  29-Dec-2002  ad Block tty interrupts in getc()/putc().
 1.29  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.28  01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.27  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.26  24-Sep-2002  ad On pmax, drop into DDB on break.
 1.25  18-Sep-2002  ad - The VSXXX is an 8-bit device, not 7.
- Obey ls->dz_line in dzputc(), since dzms uses it.
- Remove an odd "circular" reference that doesn't appear to be useful.
 1.24  06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.23  10-Jun-2002  ragge Don't try to connect a keyboard to serial line 0 if the serial console
is on line 0; it may destroy line settings.
 1.22  30-Apr-2002  ragge branches: 1.22.2; 1.22.4;
Don't try to probe for dz11 on 4000/90, may corrupt the flash rom (?).
Suggested by Hugh Graham <hugh@openbsd.org>.
 1.21  25-Feb-2002  ad Move the dz driver to dev/dec, since it can be shared with pmax.
 1.20  16-May-2001  matt branches: 1.20.2; 1.20.8;
Add a VAXANY type. Eventually to used in INSTALL / GENERIC to easily
include support for all VAX platforms
 1.19  25-Feb-2001  mrg branches: 1.19.2;
re-add.
 1.18  25-Feb-2001  mrg delete (again), then add (again) ?
 1.17  25-Feb-2001  mrg try a `cvs ci -f' to make this appear on the trunk again. no changes.
 1.16  04-Feb-2001  ragge Giant update from Michael Kukat (michael@unixiron.org).
Fixes support for:
MicroVAX 3100m90
MicroVAX 3100m95
VAX 4000/100 (tested)
VAX 4000/105A (tested)
VAX 4000/108
VAX 4000/400 (tested)
VAX 4000/500 (tested)
VAX 4000/600
 1.15  28-Jan-2001  ragge Rename dz_ibus to dz_vsbus.
 1.14  06-Aug-1999  ragge branches: 1.14.2;
Moved to dz_ibus.c,v
 1.13  06-Jun-1999  ragge Qbus moved in hierarchy.
 1.12  20-May-1999  ragge Don't detect glass tty if the machine is a workstation.
Hint from Thomas Seidmann.
 1.11  27-Mar-1999  ragge branches: 1.11.4;
Change console detection a little bit.
 1.10  26-Mar-1999  ragge Buggfixes for VS 4000/VLC. Basic support for VS4000/90 and MV4000/300.
From Michael Kukat.
 1.9  13-Mar-1999  ragge Change vsbus to take a locator for all devices.
Figure out interrupt vector/mask on vsbus by forcing all devices to
generate interrupts in the match routine, like on unibus.
 1.8  09-Mar-1999  ragge Basic KA48 (VAXstation 4000 VLC) support.
From Michael Kukat <michael@camaronet.de>
 1.7  02-Feb-1999  ragge Another giant change: Allocate register space dynamic instead of compiled-in.
This is done on a physical page size basis, instead of virtual (as the
(on vax yet non-existing) bus_* routines does). This is similar to the
way uba allocation is done.
 1.6  10-Aug-1998  ragge Support for VS4000/60.
 1.5  07-Jun-1998  ragge DDB support on glass tty. Also smarter keyboard decoding.
 1.4  04-Jun-1998  ragge Rudimentary support for the VS3100 builtin graphics console.
 1.3  23-May-1998  ragge Fixed bug with lost characters in DDB output.
 1.2  21-May-1998  ragge Support for DDB on DZ console.
 1.1  17-May-1998  ragge branches: 1.1.1;
Split the DZ11 driver into two parts; can now use the same driver on
both unibus/qbus devices and vaxstations.
 1.1.1.1  25-Feb-2001  mrg cvs ci -f did not work, try an import.
 1.11.4.1  21-Jun-1999  thorpej Sync w/ -current.
 1.14.2.1  11-Feb-2001  bouyer Sync with HEAD.
 1.19.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.20.8.6  03-Jan-2003  thorpej Sync with HEAD.
 1.20.8.5  18-Oct-2002  nathanw Catch up to -current.
 1.20.8.4  17-Sep-2002  nathanw Catch up to -current.
 1.20.8.3  20-Jun-2002  nathanw Catch up to -current.
 1.20.8.2  28-Feb-2002  nathanw Catch up to -current.
 1.20.8.1  16-May-2001  nathanw file dz_vsbus.c was added on branch nathanw_sa on 2002-02-28 04:12:33 +0000
 1.20.2.3  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.20.2.2  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.20.2.1  16-Mar-2002  jdolecek Catch up with -current.
 1.22.4.1  11-Jun-2002  lukem Pull up revision 1.23 (requested by ragge in ticket #239):
Don't try to connect a keyboard to serial line 0 if the serial console
is on line 0; it may destroy line settings.
 1.22.2.3  03-Sep-2002  gehenna fix missing brace.
 1.22.2.2  15-Jul-2002  gehenna catch up with -current.
 1.22.2.1  19-May-2002  gehenna Replace the access to devsw table and the hard-coded majors with devsw API.
 1.31.2.4  18-Dec-2004  skrll Sync with HEAD.
 1.31.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.31.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.31.2.1  03-Aug-2004  skrll Sync with HEAD
 1.35.10.2  17-Mar-2008  yamt sync with head.
 1.35.10.1  21-Jun-2006  yamt sync with head.
 1.36.10.1  19-Apr-2006  elad sync with head - hopefully this will work
 1.36.8.1  13-Mar-2006  yamt sync with head.
 1.36.6.1  22-Apr-2006  simonb Sync with head.
 1.36.4.1  09-Sep-2006  rpaulo sync with head
 1.37.64.1  03-Apr-2008  mjf Sync with HEAD.
 1.37.60.1  24-Mar-2008  keiichi sync with head.
 1.37.40.1  23-Mar-2008  matt sync with HEAD
 1.40.26.2  05-Mar-2011  rmind sync with head
 1.40.26.1  30-May-2010  rmind sync with head
 1.40.24.1  17-Aug-2010  uebayasi Sync with HEAD.
 1.40.14.1  21-Nov-2010  riz Pull up following revision(s) (requested by hans in ticket #1459):
sys/arch/vax/vsa/dz_vsbus.c: revision 1.41
sys/dev/dec/dz.c: revision 1.39
sys/arch/vax/vsa/spx.c: revision 1.3
Make SPX work as console device on VAXstation 4000/9x.
Make console keyboard work on VAXstation 4000/9x. Seems not to break
anything on other VAXstations (tested on 4000 VLC).
The interrupt handler uses the softc, so it's probably a good idea to
initialize it before causing interrupts. Prevents a panic on VAXstation
4000/9x with SPX console.
 1.40.4.1  11-Aug-2010  yamt sync with head.
 1.42.8.1  30-Oct-2012  yamt sync with head
 1.43.16.1  28-Aug-2017  skrll Sync with HEAD
 1.43.2.1  03-Dec-2017  jdolecek update from HEAD
 1.44.24.1  21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.45.8.1  04-Aug-2021  thorpej Adapt to CFARGS().
 1.47.2.1  04-Mar-2025  martin Pull up following revision(s) (requested by hans in ticket #1070):

sys/arch/vax/vsa/dz_vsbus.c: revision 1.48

vax/dz(4): fix console detection when it's not on line 0

RSS XML Feed