Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/amiga/dev/ms.c
RevisionDateAuthorComments
 1.43  01-Aug-2022  rin ms_wscons_ioctl(): Return EPASSTHROUGH instead of -1, for unsupported
ioctl, as done for other backends of wsmouse(4).
 1.42  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.41  03-Jun-2021  rin branches: 1.41.2;
kbd(4) and ms(4) carry multiple interface attributes. They are configurable
both as standalone drivers for legacy framebuffer console, or parents of
wskbd(4) and wsmouse(4), respectively. For the latter, be explicit about
using "wskbddev" and "wsmousedev" interface attributes for children.
 1.40  24-Apr-2021  thorpej branches: 1.40.2; 1.40.6;
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.39  25-Jul-2014  dholland branches: 1.39.8; 1.39.18; 1.39.42;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.38  16-Mar-2014  dholland branches: 1.38.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.37  27-Oct-2012  chs branches: 1.37.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.36  14-Mar-2009  dsl branches: 1.36.12; 1.36.22;
Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.35  12-Jan-2009  mhitch branches: 1.35.2;
Retain compatibility with old firm_event. Old Xamiga binary now works with
-current kernel.
 1.34  28-Dec-2007  joerg branches: 1.34.6; 1.34.10; 1.34.18;
Prepare for timecounter support on amiga.
 1.33  17-Oct-2007  garbled branches: 1.33.2; 1.33.8;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.32  09-Jul-2007  ad branches: 1.32.10;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.31  04-Mar-2007  christos branches: 1.31.2; 1.31.4; 1.31.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.30  12-Nov-2006  plunky branches: 1.30.4;
Tidy away wsmouse_input() abstractions and update
documentation to include the W direction.
 1.29  11-Dec-2005  christos branches: 1.29.20; 1.29.22;
merge ktrace-lwp.
 1.28  22-Sep-2003  jandberg branches: 1.28.16;
add wscons support to amiga mouse
 1.27  21-Sep-2003  jdolecek cleanup & uniform descriptor owner handling:
* introduce fsetown(), fgetown(), fownsignal() - this sets/retrieves/signals
the owner of descriptor, according to appropriate sematics
of TIOCSPGRP/FIOSETOWN/SIOCSPGRP/TIOCGPGRP/FIOGETOWN/SIOCGPGRP ioctl; use
these routines instead of custom code where appropriate
* make every place handling TIOCSPGRP/TIOCGPGRP handle also FIOSETOWN/FIOGETOWN
properly, and remove the translation of FIO[SG]OWN to TIOC[SG]PGRP
in sys_ioctl() & sys_fcntl()
* also remove the socket-specific hack in sys_ioctl()/sys_fcntl() and
pass the ioctls down to soo_ioctl() as any other ioctl

change discussed on tech-kern@
 1.26  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.25  05-Feb-2003  perry branches: 1.25.2;
"Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.24  23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.23  02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.22  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.21  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.20  28-Jan-2002  aymeric branches: 1.20.8;
add __KERNEL_RCSID as suggested by Luke Mewburn
 1.19  26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.18  18-May-2000  is branches: 1.18.6; 1.18.8; 1.18.12;
Initialize hardware for mouse mode at open time.
This fixes MB2 and MB3 on the 2nd mouse port (the first is initialized by
the Amiga ROM at boot time).
 1.17  18-May-2000  kleink Restructure the ms(4) autoconfiguration code to attach as a single device
instance and select a mouse port via the least significant bit of its
device minor number. Fixes abuse of cf_unit in this driver.
 1.16  23-Mar-2000  thorpej New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.15  12-Jan-1998  thorpej branches: 1.15.14;
Adjust for changes to config.
 1.14  23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.13  13-Oct-1996  christos backout previous kprintf change
 1.12  11-Oct-1996  mhitch Changes for poll(2).
 1.11  10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.10  09-May-1996  is First part of M68060 and DraCo support.

* for the M68060 part: store buffer and branch target cache aren't
enabled yet (this needs cleanup of lots of locore.s code which is a
maze of little passages, all a little different) (and it wasn't yet
tested in an accellerated Amiga, only in the DraCo).

I've included a workaround for 2 of the CPU bugs in chips with Masks
1F43G and earlier, but didn't bother to deal with the can of worms
in the [0-3]D11W chips. Be sure to get "68060 rev. 1" or more
reported at kernel startup time, or at least mention it (or the mask
revision, if available) when reporting problems.

* for the DraCo: only machines with a CIA timer.

I assigned machine id 32000+nn (0x7Dnn), where n is the machine
readable Quicklogic custom chip revision (also printed at boot
time). "Guaranteed to work" up to rev. 3, newer DraCo's aren't
guaranteed to have any CIA (we don't have a driver for the new timer
yet).

Supported are:

- MF-II keyboards on the native interface and A3000 keyboards via
the CIA.
- builtin SCSI interface (yet another instance of siop)
- CIA timer.
- Zorro II devices which don't do DMA (don't get mapped to Zorro II
address space in the DraCo)
- "local bus" devices which are autoconfigured by the boot rom
(should be all); only an Altais driver is there (looks like a Retina Z3)

Not yet supported are:

- native timer of newer machines.
- Real Time Clock.
- serial, parallel + floppy on the SuperIO chip (that is also: no mouse)

XXX You need an enhanced boot loader, which will committed in a few days.

XXX std.draco should and will go away.
 1.9  24-Apr-1996  is Make the Amiga mainboard mice, which used to be pseudo-devices, real devices.
(We want to support Amigoids without this interface in the near future.)
 1.8  21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.7  10-Apr-1995  mycroft Nuke write routines.
 1.6  01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.5  26-Oct-1994  cgd new RCS ID format.
 1.4  05-Jun-1994  chopps add grfrh (retina ziii) from Donn Cave <donn@u.washington.edu>
light cleanup from me. floppy changes, should now be solid.
some changes to ite and ms to fix a couple bugs report by Donn.
 1.3  08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.2  13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.1  26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.15.14.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.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.18.12.4  11-Nov-2002  nathanw Catch up to -current
 1.18.12.3  18-Oct-2002  nathanw Catch up to -current.
 1.18.12.2  17-Sep-2002  nathanw Catch up to -current.
 1.18.12.1  28-Feb-2002  nathanw Catch up to -current.
 1.18.8.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.18.8.2  11-Feb-2002  jdolecek Sync w/ -current.
 1.18.8.1  09-Sep-2001  thorpej Add kqueue support (not yet compiled).
 1.18.6.1  10-Oct-2001  fvdl Convert all remaining devices.
 1.20.8.1  16-May-2002  gehenna Add the character device switch.
 1.25.2.4  21-Nov-2004  skrll Adapt to branch.
 1.25.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.25.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.25.2.1  03-Aug-2004  skrll Sync with HEAD
 1.28.16.4  21-Jan-2008  yamt sync with head
 1.28.16.3  03-Sep-2007  yamt sync with head.
 1.28.16.2  30-Dec-2006  yamt sync with head.
 1.28.16.1  21-Jun-2006  yamt sync with head.
 1.29.22.1  10-Dec-2006  yamt sync with head.
 1.29.20.1  18-Nov-2006  ad Sync with head.
 1.30.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.31.10.1  03-Oct-2007  garbled Sync with HEAD
 1.31.4.1  11-Jul-2007  mjf Sync with head.
 1.31.2.1  15-Jul-2007  ad Sync with head.
 1.32.10.2  09-Jan-2008  matt sync with HEAD
 1.32.10.1  06-Nov-2007  matt sync with HEAD
 1.33.8.1  02-Jan-2008  bouyer Sync with HEAD
 1.33.2.1  18-Feb-2008  mjf Sync with HEAD.
 1.34.18.2  28-Apr-2009  skrll Sync with HEAD.
 1.34.18.1  19-Jan-2009  skrll Sync with HEAD.
 1.34.10.1  04-May-2009  yamt sync with head.
 1.34.6.1  17-Jan-2009  mjf Sync with HEAD.
 1.35.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.36.22.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.36.22.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.36.12.2  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.36.12.1  30-Oct-2012  yamt sync with head
 1.37.2.1  18-May-2014  rmind sync with head
 1.38.2.1  10-Aug-2014  tls Rebase.
 1.39.42.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.39.18.1  27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.39.8.1  19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.40.6.1  06-Jun-2021  cjep sync with head
 1.40.2.1  17-Jun-2021  thorpej Sync w/ HEAD.
 1.41.2.1  03-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed