Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/amiga/dev/grf.c
RevisionDateAuthorComments
 1.69  20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h> include.
 1.68  24-May-2022  andvar fix various typos in comment, documentation and log messages.
 1.67  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.66  27-Apr-2021  thorpej branches: 1.66.6;
The Amiga and Atari ports abuse some autoconfiguration internals as part
of their early console bring-up, so we need to expose some of the new
internals to them and adapt the call sites.
 1.65  24-Apr-2021  thorpej branches: 1.65.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.64  12-Nov-2015  phx branches: 1.64.32;
Xorg for amiga via wsfb. Currently available on CV64 and CV64/3D. More
graphics cards will follow, when adding wscons support to them.

I didn't manage to make the "wskbd" protocol the default in the X server,
so you have to provide a small xorg.conf with Option "Protocol" "wskbd".
The standard protocol will not work as the Amiga wskbd cannot be switched
into raw mode and has no AT-scancode translation in the kernel.

On the positive side, wskbd also works with national keymaps under X.

The graphics modes can still be defined via grfconfig(8). Xorg's wsfb
driver uses the current grf video mode, which is usually mode #1.
All resolutions and depths seem to work (tested on CV64).
 1.63  07-Nov-2015  phx Improved wscons support. Virtual screens are now working.
 1.62  25-Jul-2014  dholland branches: 1.62.4;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.61  29-Mar-2014  mlelstv branches: 1.61.2;
Appease compiler.
 1.60  16-Mar-2014  dholland 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.59  27-Oct-2012  chs branches: 1.59.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.58  13-Mar-2012  elad branches: 1.58.2;
Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
something meaningful. All relevant documentation has been updated or
written.

Most of these changes were brought up in the following messages:

http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html

Thanks to christos, manu, njoly, and jmmv for input.

Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.
 1.57  15-Dec-2011  phx Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
 1.56  30-Jun-2011  wiz branches: 1.56.2; 1.56.6;
dependant -> dependent
 1.55  03-Jun-2011  matt CFATTACH_DECL_NEW, device_t, cfdata_t
 1.54  08-Feb-2011  rmind branches: 1.54.2;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.53  20-Dec-2010  matt branches: 1.53.2; 1.53.4;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.52  26-Oct-2009  cegger branches: 1.52.4;
kill extra whitespaces
reviewed by tsutsui@
 1.51  18-Mar-2009  cegger bcopy -> memcpy
 1.50  04-Mar-2007  christos branches: 1.50.44; 1.50.52; 1.50.58;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.49  11-Dec-2005  christos branches: 1.49.26;
merge ktrace-lwp.
 1.48  07-Aug-2003  agc branches: 1.48.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.47  01-Jan-2003  thorpej branches: 1.47.2;
Use aprint_normal() for cfprint routines.
 1.46  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.45  10-Oct-2002  jdolecek replace the somewhat strange poll routine with standard nopoll() (a.k.a
seltrue())
 1.44  02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.43  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.42  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.41  17-Mar-2002  atatat branches: 1.41.4;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.40  28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.39  26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.38  19-Sep-2001  thorpej branches: 1.38.4;
machine/fbio.h -> dev/sun/fbio.h
 1.37  29-Jun-2000  mrg branches: 1.37.2; 1.37.4;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.36  26-Jun-2000  mrg remove/move more mach vm header files:

<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.35  26-Jun-2000  simonb Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
 1.34  16-Aug-1999  is branches: 1.34.2; 1.34.12;
Add a quick and dirty FBIOGVIDEO implementation. This is hardware independent,
by saving the last written FIOSVIDEO/GRFIOCBLANK value into a shadow variable
in the grf_softc and returning this value on FBIOGVIDEO.
The presence of this ioctl is needed by screenblank(8) nowadays.
Original problem reported by Lars Hecking on the port-amiga mailing list.
 1.33  12-Jan-1998  thorpej branches: 1.33.8;
Adjust for changes to config.
 1.32  23-Dec-1996  veego Get rid of __BROKEN_INDIRECT_CONFIG.
 1.31  13-Oct-1996  christos backout previous kprintf change
 1.30  11-Oct-1996  mhitch Changes for poll(2).
 1.29  10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.28  27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.27  19-May-1996  is Screenblank support:
- new fbio.h in arch/amiga/include, defining only FBIOSVIDEO
- add an IOCTL translation to arch/amiga/dev/grf.c
- add screenblank to the list of specials to build on amiga.
 1.26  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.25  17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.24  30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.23  09-Oct-1995  chopps branches: 1.23.2;
new cybervision 64 grf from Bernd Ernesti <bernd@arresum.inka.de> and others
update config files (adding missing scsibus entry for aftsc0)
 1.22  18-Aug-1995  chopps change for a2410 from is@Beverly.Rhein.DE (Ignatios Souvatzis)
 1.21  07-May-1995  chopps enable pseudo-dma on ivsc, allow no ite/grfcc.
 1.20  23-Apr-1995  chopps new grfcl driver submitted by Ezra Story <ezy@panix.com>
 1.19  10-Apr-1995  mycroft map --> mmap
 1.18  12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.17  28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.16  01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.15  26-Oct-1994  cgd new RCS ID format.
 1.14  16-Jun-1994  chopps fix boot diag output.
 1.13  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.12  11-May-1994  chopps general cleanup including boot diag messages.
 1.11  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.10  01-Apr-1994  chopps no more MAP_FILE
 1.9  17-Feb-1994  chopps modified to use generic cons. (and some grf defs changed)
 1.8  13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.7  11-Feb-1994  chopps Add missing Id's
 1.6  01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.5  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.4  30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3  02-Sep-1993  mw new source release integrated from amiga-release.
 1.2  01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1  05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2  02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1  05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.23.2.1  20-Oct-1995  chopps take a couple devices from needs-count to needs-flag.
move tty pointers to softc structs
loadbsd now fails if it cannot allocate enough chipmem.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.33.8.1  18-Feb-2000  he Pull up revision 1.34 (requested by is):
Implement GRFIOGLANK ioctl, which is nowadays needed by
screenblank(8).
 1.34.12.1  30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.34.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.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.37.4.6  10-Oct-2002  jdolecek use nokqfilter (or seltrue_kqfilter()) for drivers which provide poll
routine very similar to seltrue(); the poll routines would be cleaned
up on trunk
 1.37.4.5  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.37.4.4  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.37.4.3  11-Feb-2002  jdolecek Sync w/ -current.
 1.37.4.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.37.4.1  12-Sep-2001  thorpej Add noop kqueue entry points.
 1.37.2.2  10-Oct-2001  fvdl Convert all remaining devices.
 1.37.2.1  01-Oct-2001  fvdl Catch up with -current.
 1.38.4.7  03-Jan-2003  thorpej Sync with HEAD.
 1.38.4.6  11-Nov-2002  nathanw Catch up to -current
 1.38.4.5  18-Oct-2002  nathanw Catch up to -current.
 1.38.4.4  17-Sep-2002  nathanw Catch up to -current.
 1.38.4.3  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.38.4.2  28-Feb-2002  nathanw Catch up to -current.
 1.38.4.1  19-Sep-2001  nathanw file grf.c was added on branch nathanw_sa on 2002-02-28 04:06:37 +0000
 1.41.4.3  16-May-2002  gehenna Add the character device switch.
Replace the access to devsw table with calling devsw API.
 1.41.4.2  16-May-2002  gehenna Call device interface via device switch, not directly.
 1.41.4.1  16-May-2002  gehenna Remove BANKEDDEVPAGER stuff.
 1.47.2.4  21-Nov-2004  skrll Adapt to branch.
 1.47.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.47.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.47.2.1  03-Aug-2004  skrll Sync with HEAD
 1.48.16.2  03-Sep-2007  yamt sync with head.
 1.48.16.1  21-Jun-2006  yamt sync with head.
 1.49.26.1  12-Mar-2007  rmind Sync with HEAD.
 1.50.58.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.50.52.1  28-Apr-2009  skrll Sync with HEAD.
 1.50.44.2  11-Mar-2010  yamt sync with head
 1.50.44.1  04-May-2009  yamt sync with head.
 1.52.4.2  12-Jun-2011  rmind sync with head
 1.52.4.1  05-Mar-2011  rmind sync with head
 1.53.4.1  17-Feb-2011  bouyer Sync with HEAD
 1.53.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.54.2.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.56.6.2  05-Apr-2012  mrg sync to latest -current.
 1.56.6.1  18-Feb-2012  mrg merge to -current.
 1.56.2.3  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.56.2.2  30-Oct-2012  yamt sync with head
 1.56.2.1  17-Apr-2012  yamt sync with head
 1.58.2.3  03-Dec-2017  jdolecek update from HEAD
 1.58.2.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.58.2.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.59.2.1  18-May-2014  rmind sync with head
 1.61.2.1  10-Aug-2014  tls Rebase.
 1.62.4.1  27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.64.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.65.2.1  13-May-2021  thorpej Sync with HEAD.
 1.66.6.1  03-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed