Home | History | Annotate | Download | only in tc
History log of /src/sys/dev/tc/stic.c
RevisionDateAuthorComments
 1.59  20-Jul-2022  thorpej In the Alpha tc_syncbus(), we need to issue a MB because WMB does not
order reads with respect to writes. Remove now-redundant tc_wmb()
calls before tc_syncbus().

NFC on MIPS other than removing a redundant wbflush() (tc_wmb() followed
by tc_syncbus()).
 1.58  18-May-2022  andvar fix typos in word "access" and it derivatives, mainly in comments.
 1.57  17-Aug-2021  andvar fix multiplei repetitive typos in comments, messages and documentation. mainly because copy paste code big amount of files are affected.
 1.56  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.55  24-Apr-2021  thorpej branches: 1.55.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.54  10-Nov-2019  chs branches: 1.54.10;
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.53  30-Mar-2018  maya branches: 1.53.2;
correct typo: and and -> and (comments only)

heads up on this being a common typo from chris28.
 1.52  24-Jan-2018  riastradh branches: 1.52.2;
Fix integer overflows noted by Silvio Cesare of InfoSect.

Someone^TM should name these idioms so we can eliminate this class of
copypasta bug.
 1.51  25-Jul-2014  dholland Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.50  16-Mar-2014  dholland branches: 1.50.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.49  11-Jan-2012  macallan branches: 1.49.6; 1.49.10;
adjust wsfont_find()
 1.48  13-Nov-2010  uebayasi branches: 1.48.8; 1.48.12;
Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants. These are provided by sys/param.h now.
 1.47  02-Nov-2010  skrll Spell immediately correctly.
 1.46  22-Aug-2009  tsutsui branches: 1.46.2; 1.46.4;
u_intNN_t -> uintNN_t
 1.45  09-Jul-2008  joerg - device/softc split
- make sfbplus at least compilable
 1.44  26-May-2008  nisimura branches: 1.44.2; 1.44.4;
- assign 2 clause TNF license to the files cited as my ownership.
- abandon and remove my copyright notice from the three files were
copied in order to adapt HW I don't have; pvr.c, pm.c and stic.c
 1.43  28-Apr-2008  martin branches: 1.43.2;
Remove clause 3 and 4 from TNF licenses
 1.42  19-Oct-2007  ad branches: 1.42.16; 1.42.18; 1.42.20;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.41  21-Jul-2007  ad branches: 1.41.4; 1.41.6; 1.41.10; 1.41.12;
Don't depend on uvm_extern.h pulling in proc.h.
 1.40  09-Jul-2007  ad branches: 1.40.2;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.39  04-Mar-2007  yamt branches: 1.39.2; 1.39.4;
fix fallout from caddr_t changes.
 1.38  04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.37  02-Dec-2006  elad branches: 1.37.2;
Change kauth(9) KPI for kauth_authorize_device_passthru() to add another
argument, u_long, serving as a bit-mask of generic requests for the
passthru request.

Discussed on tech-security@ and tech-kern@. Okay tls@.
 1.36  08-Nov-2006  dogcow branches: 1.36.2;
remove extraneous kauth check; since open already does the auth - and
mmap doesn't even get passed the lwp - the check here neither compiles
nor does anything terribly useful.
 1.35  08-Nov-2006  elad Replace securelevel checks with kauth(9) calls.
 1.34  23-Aug-2006  christos branches: 1.34.2; 1.34.4;
Acting as Elad's keyboard:

Place the securelevel checks in their logical locations.
This will be clearer in the future when code changes to use kauth(9) calls.

input and okay ad@
 1.33  14-May-2006  elad integrate kauth.
 1.32  12-Apr-2006  jmmv Add an extra cookie to the ioctl and mmap wsdisplay accessops that points
to the screen on which they are being called. The driver cannot guess
this by itself but it is needed to implement, at least, the getwschar and
putwschar functions in the correct place. There are no functional changes
yet.

Tested on i386 (vga, vga_raster, machfb, vesafb), macppc and sparc64.
Suggested and reviewed by macallan@.
 1.31  31-Mar-2006  thorpej Use ANSI function decls, apply static.
 1.30  11-Dec-2005  christos branches: 1.30.4; 1.30.6; 1.30.8; 1.30.10; 1.30.12;
merge ktrace-lwp.
 1.29  02-Jun-2005  drochner branches: 1.29.2;
avoid "volatile" cast-aways
 1.28  27-Feb-2005  perry nuke trailing whitespace
 1.27  17-Dec-2003  ad branches: 1.27.8; 1.27.10;
- Restore the display to a sane state when leaving mapped mode.
- OR updates into sc_changed, and protect with spltty()/splx().
 1.26  13-Nov-2003  chs eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed. however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors. most of
the callers of uvm_useracc() make the above incorrect assumption. the
rest are all misguided optimizations, which optimize for the case
where an operation will fail. we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors. since there appear to be no good uses of uvm_useracc(), we'll
just remove it.
 1.25  27-Oct-2003  chs uninitialized variables
 1.24  29-Jun-2003  fvdl branches: 1.24.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.23  29-Jun-2003  simonb Fix 'struct lwp *' lossage.
 1.22  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.21  27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.20  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.19  19-Aug-2002  itohy Leaving overflow-sensitive code, very similar to what was fixed
in the previous changes to cfb.c / sfb.c / xcfb.c, would not be clever.
Just modify in the similar way.
 1.18  04-Jul-2002  junyoung alloc_attr -> allocattr

Approved by Matthias Drochner.
 1.17  17-Mar-2002  atatat branches: 1.17.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.16  13-Mar-2002  ad Reorganise the wsfont stuff slightly so that multiple display adapters
with different bit/byte order requirements can co-exist happily.
 1.15  22-Feb-2002  ad Replace one of two divide ops with an AND when calculating the XYMASK
address.
 1.14  11-Feb-2002  wiz s/seperate/separate/
 1.13  12-Jan-2002  tsutsui Call malloc(9) with M_ZERO flag instead of memset() after malloc().
 1.12  13-Nov-2001  lukem add/cleanup RCSIDs
 1.11  18-Sep-2001  ad Beef up the stic X interface, and tighten a few screws here and there.
 1.10  18-Sep-2001  wiz Give initiali[sz]e all the "i"s it deserves.
 1.9  05-Aug-2001  jdolecek branches: 1.9.2;
use unsigned variable types as appropriate
 1.8  04-Mar-2001  ad branches: 1.8.2; 1.8.4;
Make this work on alpha, and fix some other bogons.
 1.7  09-Jan-2001  ad - Make VDAC state per-board.
- Add an ioctl to reset the STIC.
- Add an ioctl to restore the screen contents from backing.
- Other tweaks.
 1.6  22-Dec-2000  ad - Fix bugs, make this useful.
- Add ioctls to start and stop the co-processor (if present).
 1.5  17-Dec-2000  ad Thinko.
 1.4  17-Dec-2000  ad Add wscons drivers for the DEC PixelStamp graphics accelerators.
 1.3  13-Apr-1999  ad branches: 1.3.2;
Removed pending write of fully-functional MI driver.
 1.2  16-Jan-1999  nisimura branches: 1.2.4;
- Don't use void pointer for arithmetic.
 1.1  11-Nov-1997  jonathan branches: 1.1.2;
chipset driver for DEC pixelstamp and STIC (stamp Interface chip).
 1.1.2.2  11-Nov-1997  jonathan chipset driver for DEC pixelstamp and STIC (stamp Interface chip).
 1.1.2.1  11-Nov-1997  jonathan file stic.c was added on branch netbsd-1-3 on 1997-11-11 04:47:58 +0000
 1.2.4.1  21-Jun-1999  thorpej Sync w/ -current.
 1.3.2.3  12-Mar-2001  bouyer Sync with HEAD.
 1.3.2.2  18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.3.2.1  05-Jan-2001  bouyer Sync with HEAD
 1.8.4.7  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.8.4.6  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.8.4.5  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.8.4.4  16-Mar-2002  jdolecek Catch up with -current.
 1.8.4.3  11-Feb-2002  jdolecek Sync w/ -current.
 1.8.4.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.8.4.1  25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.8.2.10  11-Nov-2002  nathanw Catch up to -current
 1.8.2.9  18-Oct-2002  nathanw Catch up to -current.
 1.8.2.8  17-Sep-2002  nathanw Catch up to -current.
 1.8.2.7  27-Aug-2002  nathanw Catch up to -current.
 1.8.2.6  01-Aug-2002  nathanw Catch up to -current.
 1.8.2.5  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.8.2.4  28-Feb-2002  nathanw Catch up to -current.
 1.8.2.3  14-Nov-2001  nathanw Catch up to -current.
 1.8.2.2  21-Sep-2001  nathanw Catch up to -current.
 1.8.2.1  24-Aug-2001  nathanw Catch up with -current.
 1.9.2.2  10-Oct-2001  fvdl Convert all remaining devices.
 1.9.2.1  01-Oct-2001  fvdl Catch up with -current.
 1.17.4.3  29-Aug-2002  gehenna catch up with -current.
 1.17.4.2  15-Jul-2002  gehenna catch up with -current.
 1.17.4.1  16-May-2002  gehenna Add the character device switch.
 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-Nov-2004  skrll Adapt to branch. Alpha kernels now compile.
 1.24.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.24.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.24.2.1  03-Aug-2004  skrll Sync with HEAD
 1.27.10.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.27.8.1  29-Apr-2005  kent sync with -current
 1.29.2.4  27-Oct-2007  yamt sync with head.
 1.29.2.3  03-Sep-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.30.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.30.10.1  19-Apr-2006  elad sync with head.
 1.30.8.3  03-Sep-2006  yamt sync with head.
 1.30.8.2  24-May-2006  yamt sync with head.
 1.30.8.1  01-Apr-2006  yamt sync with head.
 1.30.6.1  22-Apr-2006  simonb Sync with head.
 1.30.4.1  09-Sep-2006  rpaulo sync with head
 1.34.4.1  10-Dec-2006  yamt sync with head.
 1.34.2.2  12-Jan-2007  ad Sync with head.
 1.34.2.1  18-Nov-2006  ad Sync with head.
 1.36.2.1  04-Dec-2006  tron Pull up following revision(s) (requested by elad in ticket #247):
sys/dev/ic/dpt.c: revision 1.55
sys/dev/pci/amr.c: revision 1.43
sys/secmodel/bsd44/secmodel_bsd44_securelevel.c: revision 1.19
sys/dev/pci/mly.c: revision 1.33
share/man/man9/kauth.9: revision 1.37
sys/dev/ic/mlx.c: revision 1.49
sys/dev/ic/icp_ioctl.c: revision 1.14
sys/dev/i2o/iop.c: revision 1.62
sys/dev/pci/twe.c: revision 1.82
sys/sys/kauth.h: revision 1.25
sys/dev/i2o/dpti.c: revision 1.31
sys/kern/kern_auth.c: revision 1.33
sys/dev/tc/stic.c: revision 1.37
Change kauth(9) KPI for kauth_authorize_device_passthru() to add another
argument, u_long, serving as a bit-mask of generic requests for the
passthru request.
Discussed on tech-security@ and tech-kern@. Okay tls@.
 1.37.2.1  12-Mar-2007  rmind Sync with HEAD.
 1.39.4.1  11-Jul-2007  mjf Sync with head.
 1.39.2.4  23-Oct-2007  ad Sync with head.
 1.39.2.3  09-Oct-2007  ad Sync with head.
 1.39.2.2  15-Jul-2007  ad Get pmax working.
 1.39.2.1  01-Jul-2007  ad Adapt to callout API change.
 1.40.2.1  15-Aug-2007  skrll Sync with HEAD.
 1.41.12.2  21-Jul-2007  ad Don't depend on uvm_extern.h pulling in proc.h.
 1.41.12.1  21-Jul-2007  ad file stic.c was added on branch matt-mips64 on 2007-07-21 19:06:22 +0000
 1.41.10.1  25-Oct-2007  bouyer Sync with HEAD.
 1.41.6.1  06-Nov-2007  matt sync with HEAD
 1.41.4.1  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.42.20.3  16-Sep-2009  yamt sync with head
 1.42.20.2  04-May-2009  yamt sync with head.
 1.42.20.1  16-May-2008  yamt sync with head.
 1.42.18.2  04-Jun-2008  yamt sync with head
 1.42.18.1  18-May-2008  yamt sync with head.
 1.42.16.2  28-Sep-2008  mjf Sync with HEAD.
 1.42.16.1  02-Jun-2008  mjf Sync with HEAD.
 1.43.2.2  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.43.2.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.44.4.1  19-Oct-2008  haad Sync with HEAD.
 1.44.2.1  18-Jul-2008  simonb Sync with head.
 1.46.4.1  05-Mar-2011  rmind sync with head
 1.46.2.1  06-Nov-2010  uebayasi Sync with HEAD.
 1.48.12.1  18-Feb-2012  mrg merge to -current.
 1.48.8.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.48.8.1  17-Apr-2012  yamt sync with head
 1.49.10.1  18-May-2014  rmind sync with head
 1.49.6.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.50.2.1  10-Aug-2014  tls Rebase.
 1.52.2.1  07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.53.2.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.54.10.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.55.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed