Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/sparc64/dev/zs.c
RevisionDateAuthorComments
 1.81  12-Dec-2023  andvar remove TTY_DEBUG code from sun2/sparc64 zs.c code. it doesn't look relevant
to this particular drivers and likely is a leftover from some historical code.
 1.80  26-Oct-2022  riastradh sparc64/zs(4): Convert to ttylock/ttyunlock.
 1.79  26-Oct-2022  riastradh ddb/db_active.h: New home for extern db_active.

This can be included unconditionally, and db_active can then be
queried unconditionally; if DDB is not in the kernel, then db_active
is a constant zero. Reduces need for #include opt_ddb.h, #ifdef DDB.
 1.78  11-Sep-2021  andvar Add missing double p and d for stopped and overriden accordingly.
Fix few more typos along the way, mainly in copy-pasted comments.
 1.77  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.76  24-Apr-2021  thorpej branches: 1.76.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.75  30-Oct-2015  tsutsui branches: 1.75.32;
Add a missing newline in zs at sbus attach message.
 1.74  27-Oct-2012  chs branches: 1.74.12; 1.74.14; 1.74.16;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.73  12-Aug-2011  jdc branches: 1.73.2; 1.73.12;
Use aprint_normal(). From apb@.
 1.72  12-Aug-2011  jdc Add missing new line to zs_attach_fhc()
 1.71  29-Jul-2011  mrg port the openbsd central and fhc drivers, and the clock/zs attachments.
doesn't quite work yet, crashes when central_attach() calls
config_attach() (faulting address is 0xf8000000.)
 1.70  12-Mar-2011  nakayama Remove implicit include <dev/sbus/sbusvar.h> from autoconf.h, and
add it explicitly in files depending on it.
 1.69  26-Oct-2009  martin branches: 1.69.4; 1.69.6;
g/c zssoftpending
 1.68  22-May-2009  mrg add two new functions for z8530tty: zs_chan_lock() and zs_chan_unlock(),
and use them instead of various spl's in the zs.c's.

reviewed by ad and martin.
 1.67  13-Jun-2008  cegger branches: 1.67.6;
use device_lookup_private to get softc
 1.66  28-Apr-2008  martin branches: 1.66.2; 1.66.4;
Remove clause 3 and 4 from TNF licenses
 1.65  29-Mar-2008  tsutsui branches: 1.65.2; 1.65.4;
Split softc and device_t for zsc(4) and its children.

XXX we should restructure MI APIs and make it really machine independent.
 1.64  28-Nov-2007  ad branches: 1.64.14;
Use the softint API.
 1.63  09-Nov-2007  ad Call zs_lock_init() to set up the chanstate's lock.
 1.62  16-Oct-2006  martin branches: 1.62.8; 1.62.26; 1.62.28; 1.62.32; 1.62.34;
Initializers
 1.61  18-Aug-2006  martin branches: 1.61.2; 1.61.4;
Fix wrong prom_getoption() return value checks
 1.60  28-Mar-2006  thorpej branches: 1.60.6;
Use device_is_a().
 1.59  28-Mar-2006  thorpej Use device_unit().
 1.58  13-Feb-2006  cdi branches: 1.58.2; 1.58.4; 1.58.6;
ANSIfy: u_intN_t -> uintN_t, remove __P(), fix function definitions.
 1.57  11-Feb-2006  cdi ANSIfication: u_intN_t -> uintN_t, use ANSI function declarations/definitions
instead of K&R ones.
 1.56  11-Dec-2005  christos branches: 1.56.2; 1.56.4; 1.56.6;
merge ktrace-lwp.
 1.55  19-Jul-2005  macallan use zstty_get_tty_from_dev() instead of using a zstty_softc lookalike hack,
same as in sparc/dev/zs.c
 1.54  21-Mar-2004  pk branches: 1.54.14; 1.54.16;
Use the promlib I/O routines.
 1.53  19-Mar-2004  pk zs_console_flags: use prom_getoption().
 1.52  19-Mar-2004  pk Drop fbnode & stdinnode.
 1.51  17-Mar-2004  pk Rename PROM_getprop*() => prom_getprop*().
 1.50  13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.49  09-Nov-2003  martin Nuke bcopy/bzero.
 1.48  31-Oct-2003  petrov Attach zs to sbus only, current driver cannot attach to mainbus.
 1.47  15-Jul-2003  lukem __KERNEL_RCSID()
 1.46  28-Jan-2003  pk branches: 1.46.2;
Provide locking required by the interrupt handlers running at IPL_SERIAL.
 1.45  01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.44  10-Dec-2002  pk Remove the `flags' argument from bus_intr_establish().
 1.43  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.42  01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.41  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.40  27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.39  27-Sep-2002  thorpej Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver. The cfdriver is then looked
up in a list which is built at run-time.
 1.38  26-Sep-2002  thorpej Compare driver name, don't check against zstty_cd.
 1.37  21-Sep-2002  petrov Use /options instead of /chosen to find out where console is.
(found by Rafal Boni).
 1.36  12-Sep-2002  abs Protect extern zstty_cd with (NKBD > 0) || (NMS > 0)
 1.35  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.34  21-Mar-2002  eeh branches: 1.34.4; 1.34.6;
Add missing semicolon.
 1.33  20-Mar-2002  eeh Overhaul bus space.

bus_space_handle_t now holds an address and two ASIs, one for normal accesses
and one for streaming accesses. This allows to map individual handles
different ways, so some can use MMU bypass accesses and others use virtual
addresses. bus_space_map() will now create handles that use bypass accesses
unles BUS_SPACE_MAP_LINEAR is passed in. So only pass in BUS_SPACE_MAP_LINEAR
if you absolutely *need* to use bus_space_vaddr(). This removes at least one
extra level of indirection and should reduce TLB misses.

32-bit kernels have problems accessing 64-bit addresses, so they always use
virtual addresses.
 1.32  14-Mar-2002  eeh sbus_bus_map() no longer has a preferred vaddr parameter.
 1.31  05-Oct-2001  eeh branches: 1.31.4;
Remove bsd_openprom.h, which is only for compatibility with the sparc port.
 1.30  26-Sep-2001  eeh getprop* -> PROM_getprop*
 1.29  30-May-2001  lukem branches: 1.29.2; 1.29.4;
add missing #include "opt_kgdb.h"
 1.28  03-Dec-2000  fvdl branches: 1.28.2;
Make softintr_establish prototype match other ports, avoiding compile
warnings.
 1.27  10-Nov-2000  mrg remove unused variable
 1.26  09-Nov-2000  eeh Attach the sunkbd line discipline to zstty.
 1.25  10-Jul-2000  eeh Function signature for bus_intr_establish() changed.
 1.24  09-Jul-2000  eeh Upgrate interrupt handling:

1) use interrupt vectors for specific zs chips rather than polling
all of them.

2) use softintr_schedule() and schedule it for a particular device
rather than poll all devices.
 1.23  09-Jul-2000  pk Add a `device class' interrupt level argument (from machine/intr.h)
to bus_interrupt_establish().

It's currently only used in sparc64/dev/psycho.c to assign a CPU interrupt
level to devices in PCI slots.
 1.22  24-Jun-2000  eeh Get rid of vaddrs.h.
 1.21  04-Jun-2000  cgd branches: 1.21.2;
Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.20  19-May-2000  eeh branches: 1.20.2;
Fix the sparc64 console.

Unlike the other Sun machines, UltraSPARCs can have consoles run on different
chips than zs, so we need to support them. So, here we go:

Add a new PROM console driver with a major number and everything.
This is the default driver if nothing else attaches. It does not
use the keyboard driver since the PROM translates keystrokes itself.
(Unfortunately it also swallows L1-A).

Have the keyboard driver take over the console when it attaches on a
serial port. When a serial port detects a keyboard and attaches the
keyboard driver, it needs to provide a set of consdev vectors. They
keyboard driver will use those to send I/O to the keyboard and mouse.
 1.19  17-May-2000  mrg move zs_attach() to after the setting of the console device, to avoid
having cn_dev being 0 and thus cnopen() being called recursively. this
fixes this problem for zs-based console's only.
 1.18  13-Apr-2000  mrg this does not need auxreg.h
 1.17  10-Apr-2000  pk Get a kernel without DDB to build.
 1.16  08-Apr-2000  mrg include <ddb/db_output.h> to get the db_printf() prototype.
 1.15  16-Mar-2000  eeh Revamp interrupts again:

Fix a bug causing interrmittent panics in interrupt dispatch.
Use interrupt vectors for softints.
Add a new send_softint interface.
Improved D$ flushing.
Improve traptrace and other debugging enhancements.
 1.14  06-Mar-2000  thorpej - Implement cnbell() -- ring the console bell. The cn_bell entrypoint
is optional.
- Add cn_bell to statically allocated consdevs as appropriate.
 1.13  11-Oct-1999  eeh branches: 1.13.2;
Update to post 1.4.
 1.12  23-May-1999  eeh branches: 1.12.2;
Start putting in hooks for non-zs console devices.
 1.11  25-Apr-1999  eeh Defer final console attach to zs_attach().
 1.10  24-Apr-1999  eeh Deprecate `findzs()' and try to map in the zs registers if they're not mapped
by the prom.
 1.9  27-Mar-1999  wrstuden branches: 1.9.4;
Add pps support. Only enable pps if CLOCAL & !MDMBUF.
 1.8  28-Feb-1999  eeh Let's try to make prom_cnget() work.
 1.7  11-Feb-1999  mycroft Minor cleanup.
Make the initializer for BAUDLO depend on PCLK directly; it was incorrect on
some ports where PCLK is not 4.9152MHz.
XXX Is the default value actually used?
 1.6  03-Feb-1999  mycroft Don't set DCD_IE in the frontends. KGDB doesn't even use DCD, and the tty
frontends get it from zsparam() anyway.
 1.5  05-Sep-1998  eeh It slices. It dices. It does everything except exec a sparc32_compat init.
 1.4  02-Sep-1998  eeh Periodic update: now starts probing devices.
 1.3  13-Aug-1998  eeh Merge paddr_t changes into the main branch.
 1.2  04-Jul-1998  jonathan branches: 1.2.2;
defopt DDB.
 1.1  20-Jun-1998  eeh branches: 1.1.1;
Initial revision
 1.1.1.1  20-Jun-1998  eeh Import of sparc64.
 1.2.2.1  30-Jul-1998  eeh Split vm_offset_t and vm_size_t into paddr_t, psize_t, vaddr_t, and vsize_t.
 1.9.4.1  21-Jun-1999  thorpej Sync w/ -current.
 1.12.2.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.2.3  08-Dec-2000  bouyer Sync with HEAD.
 1.13.2.2  22-Nov-2000  bouyer Sync with HEAD.
 1.13.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.20.2.1  22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.21.2.1  18-Jul-2000  mrg pullup the contents of -current arch/sparc64. this gives us significant
ultrasparc PCI support (ultra5, ultra10, AXi, and E250 tested so far),
plus many other small fixes. netbooting is now supported.
 1.28.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.29.4.3  11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 1.29.4.2  10-Oct-2001  fvdl Convert all remaining devices.
 1.29.4.1  01-Oct-2001  fvdl Catch up with -current.
 1.29.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.29.2.2  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.29.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.31.4.6  03-Jan-2003  thorpej Sync with HEAD.
 1.31.4.5  11-Dec-2002  thorpej Sync with HEAD.
 1.31.4.4  18-Oct-2002  nathanw Catch up to -current.
 1.31.4.3  17-Sep-2002  nathanw Catch up to -current.
 1.31.4.2  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.31.4.1  05-Oct-2001  nathanw file zs.c was added on branch nathanw_sa on 2002-04-01 07:43:07 +0000
 1.34.6.1  07-Dec-2002  he Pull up revision 1.36 (requested by abs in ticket #890):
Allow sparc64 kernels to be compiled without kbd.
 1.34.4.1  19-May-2002  gehenna Remove hard-coded major.
 1.46.2.4  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.46.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.46.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.46.2.1  03-Aug-2004  skrll Sync with HEAD
 1.54.16.4  07-Dec-2007  yamt sync with head
 1.54.16.3  15-Nov-2007  yamt sync with head.
 1.54.16.2  30-Dec-2006  yamt sync with head.
 1.54.16.1  21-Jun-2006  yamt sync with head.
 1.54.14.1  12-Sep-2006  ghen Pull up following revision(s) (requested by martin in ticket #1507):
sys/arch/sparc64/dev/zs.c: revision 1.61
sys/arch/sparc64/dev/ffb.c: revision 1.28
Fix wrong prom_getoption() return value checks
 1.56.6.1  22-Apr-2006  simonb Sync with head.
 1.56.4.1  09-Sep-2006  rpaulo sync with head
 1.56.2.1  18-Feb-2006  yamt sync with head.
 1.58.6.1  31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.58.4.1  19-Apr-2006  elad sync with head - hopefully this will work
 1.58.2.2  03-Sep-2006  yamt sync with head.
 1.58.2.1  01-Apr-2006  yamt sync with head.
 1.60.6.1  21-Aug-2006  tron Pull up following revision(s) (requested by martin in ticket #34):
sys/arch/sparc64/dev/zs.c: revision 1.61
sys/arch/sparc64/dev/ffb.c: revision 1.28
Fix wrong prom_getoption() return value checks
 1.61.4.1  22-Oct-2006  yamt sync with head
 1.61.2.1  18-Nov-2006  ad Sync with head.
 1.62.34.2  08-Dec-2007  mjf Sync with HEAD.
 1.62.34.1  19-Nov-2007  mjf Sync with HEAD.
 1.62.32.1  13-Nov-2007  bouyer Sync with HEAD
 1.62.28.1  09-Jan-2008  matt sync with HEAD
 1.62.26.2  03-Dec-2007  joerg Sync with HEAD.
 1.62.26.1  11-Nov-2007  joerg Sync with HEAD.
 1.62.8.1  03-Dec-2007  ad Sync with HEAD.
 1.64.14.3  29-Jun-2008  mjf Sync with HEAD.
 1.64.14.2  02-Jun-2008  mjf Sync with HEAD.
 1.64.14.1  03-Apr-2008  mjf Sync with HEAD.
 1.65.4.4  11-Mar-2010  yamt sync with head
 1.65.4.3  20-Jun-2009  yamt sync with head
 1.65.4.2  04-May-2009  yamt sync with head.
 1.65.4.1  16-May-2008  yamt sync with head.
 1.65.2.2  17-Jun-2008  yamt sync with head.
 1.65.2.1  18-May-2008  yamt sync with head.
 1.66.4.1  18-Jun-2008  simonb Sync with head.
 1.66.2.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.67.6.1  16-Jan-2011  bouyer Pull up following revision(s) (requested by mrg in ticket #1526):
sys/arch/sparc/dev/zs.c: revision 1.115
sys/dev/ic/z8530sc.h: revision 1.26
sys/dev/ic/z8530sc.c: revision 1.30
sys/dev/ic/z8530tty.c: revision 1.127
sys/arch/sparc64/dev/zs.c: revision 1.68
add two new functions for z8530tty: zs_chan_lock() and zs_chan_unlock(),
and use them instead of various spl's in the zs.c's.
reviewed by ad and martin.
 1.69.6.1  06-Jun-2011  jruoho Sync with HEAD.
 1.69.4.1  21-Apr-2011  rmind sync with head
 1.73.12.2  03-Dec-2017  jdolecek update from HEAD
 1.73.12.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.73.2.1  30-Oct-2012  yamt sync with head
 1.74.16.1  26-Dec-2015  snj Pull up following revision(s) (requested by tsutsui in ticket #1050):
sys/arch/sparc64/dev/zs.c: revision 1.75
Add a missing newline in zs at sbus attach message.
 1.74.14.1  27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.74.12.1  26-Dec-2015  snj Pull up following revision(s) (requested by tsutsui in ticket #1050):
sys/arch/sparc64/dev/zs.c: revision 1.75
Add a missing newline in zs at sbus attach message.
 1.75.32.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.76.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed