Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/arc/dev/pccons.c
RevisionDateAuthorComments
 1.63  24-May-2022  andvar fix various typos in comment, documentation and log messages.
 1.62  18-Oct-2014  snj branches: 1.62.4; 1.62.10;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.61  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.60  16-Mar-2014  dholland branches: 1.60.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.59  01-Jul-2011  dyoung branches: 1.59.2; 1.59.12; 1.59.16;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.58  24-Apr-2011  rmind Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.57  14-Mar-2009  dsl branches: 1.57.4; 1.57.6;
ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.56  13-Sep-2008  tsutsui branches: 1.56.2; 1.56.8;
- use memmove(9) for possible overlapped screen copies, per PR port-arc/36703
- replace bcopy(9) with memcpy(9) where no overlap
- fix a typo in comment
Tested by using sysinst with pccons(4) on gxemul.
 1.55  13-Sep-2008  tsutsui Make this compile (restore some lines removed in rev 1.53).
 1.54  13-Jun-2008  cegger branches: 1.54.2;
use device_lookup_private to get softc
 1.53  19-Nov-2007  ad branches: 1.53.14; 1.53.16; 1.53.18; 1.53.20; 1.53.22;
- Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
 1.52  18-Oct-2007  joerg branches: 1.52.2;
Initialise the callbacks for tty.t_rstrt_ch in ttymalloc
as all drivers but Sun/SPARC's kd.c use the same arguments.
Separate callout_reset into callout_schedule and the initial
callout_setfunc using that.
 1.51  17-Oct-2007  garbled 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.50  09-Jul-2007  ad branches: 1.50.8; 1.50.10; 1.50.14;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.49  04-Mar-2007  christos branches: 1.49.2; 1.49.4; 1.49.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.48  01-Oct-2006  elad branches: 1.48.4;
Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks!
 1.47  01-Sep-2006  matt branches: 1.47.2; 1.47.4;
Make this compile again. -Wshadow and other gcc4 stuff.
 1.46  23-Jul-2006  ad Use the LWP cached credentials where sane.
 1.45  01-Jul-2006  tsutsui Use MI <dev/ic/pcdisplay.h> rather than MD <machine/display.h>.
 1.44  14-May-2006  elad branches: 1.44.4;
integrate kauth.
 1.43  15-Apr-2006  tsutsui Include "ioconf.h" rather than declare struct cfdriver foo_cd in each file.
 1.42  24-Dec-2005  perry branches: 1.42.4; 1.42.6; 1.42.8; 1.42.10; 1.42.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.41  11-Dec-2005  christos merge ktrace-lwp.
 1.40  06-Sep-2005  kleink Change the driver open function's conditional for overriding exclusive tty
use from checking the proc's uid to suser(9), and account for the use of
privileges. Noted by David Holland in PR kern/31126.
 1.39  22-Jan-2005  tsutsui branches: 1.39.8;
- remove __P()
- use ANSI function decls
- u_intNN_t -> uintNN_t
- some KNF
 1.38  13-Feb-2004  wiz branches: 1.38.8;
Uppercase CPU, plural is CPUs.
 1.37  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.36  15-Jul-2003  lukem __KERNEL_RCSID()
 1.35  27-Apr-2003  tsutsui branches: 1.35.2;
Remove register declarations.
 1.34  21-Mar-2003  tsutsui Yet another leftover of struct consdev changes..
 1.33  20-Jan-2003  simonb The Double-Semi-Colon Police.
 1.32  19-Jan-2003  tsutsui TAB/space cleanup.
 1.31  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.30  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.29  17-Mar-2002  atatat branches: 1.29.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.28  28-Sep-2001  chs branches: 1.28.4;
don't depend on other headers to include sys/proc.h for us.
 1.27  13-Jun-2001  soda branches: 1.27.2; 1.27.4;
split pccons driver into "pccons" and "opms",
also split into bus-dependent frontend and bus-independent backend.
 1.26  11-May-2001  tsutsui - Declare pccnattach() in <machine/pccons.h>
- Make cpu_reboot() reset machines properly without pccons
 1.25  02-May-2001  scw Add `l_poll' to `struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
 1.24  17-Feb-2001  tsutsui branches: 1.24.2;
Add new arctype for NEC Express5800/230A.

XXX: we should have "sysconf" structures like pmax.
 1.23  24-Dec-2000  ur Switch pica to jazzio.
Split shared MD portion between algor and jazzio.
 1.22  02-Nov-2000  eeh branches: 1.22.2;
Adapt to new line discipline scheme.
 1.21  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.20  17-Jun-2000  soda branches: 1.20.2;
vga/pckbc attachment for jazz internal bus of Magnum derived machines
(including Pica, NEC RISCstation/RISCserver).
 1.19  12-Jun-2000  soda shut up gcc warning: suggest explicit braces to avoid ambiguous `else'
from Izumi TSUTSUI <tsutsui@netbsd.org> and Shuichiro URATA <ur@a-r.org>.
 1.18  09-Jun-2000  soda - NEC RISCstation 2250 (RD-94) PCI bus support,
contributed by Shuichiro URATA <ur@a-r.org>.
- Experimental coding for NEC RISCserver 2200 and RISCstation 2200.
(doesn't really work)
 1.17  23-Mar-2000  thorpej branches: 1.17.2;
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.16  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.15  03-Mar-2000  soda cosmetic change.
 1.14  22-Feb-2000  soda merge changes between OpenBSD-2.1 and OpenBSD-2.6
 1.13  23-Jan-2000  soda merge to NetBSD-current (DeskStation and Algor support is currently broken)
 1.12  23-Jan-2000  soda Moved from /cvsroot/syssrc/sys/arch/pica/dev/pccons.c,v
 1.11  15-Aug-1998  mycroft Make copyright notices with my name consistent.
 1.10  21-Mar-1998  mycroft Eliminate uses of TS_WOPEN in hard-wired devices.
 1.9  12-Jan-1998  thorpej Update for changes to config.
 1.8  16-Jun-1997  jonathan Drop in pmspoll() from NetBSD-current/i386 pms.c.
 1.7  16-Jun-1997  jonathan First delint pass of old NetBSD/pica device drivers:
* add prototypes to <dma.h> for the per-device dma-setup functions.
* MachEmptyWriteBuffer() -> wbflush(). Also #include <bus.h>,
so that wbflush() expants to the locore callback vector entrypoint.
 1.6  13-Oct-1996  christos backout previous kprintf change
 1.5  10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.4  11-Aug-1996  jonathan Fix old lint and changes not pulled back from pmax, pass1:
* include <mips/locore.h> where callbacks into locore are made, to get
prototypes in scope. Cast calls appropriately.
* include <mips/cpuregs.h>, not the old Sprite-derived <machine/machConst.h>.
machConst.h is deprecated.
* dk_establish() must return void, not int.
 1.3  27-Mar-1996  jonathan Fixup after "New device attachment scheme": Fix cfattach typos.
"struct cfattch pms_ca" (should be "cfattach"), and
"struct cfattach fd_cd" ("should be fd_ca").
 1.2  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.1  13-Mar-1996  jonathan branches: 1.1.1;
Initial revision
 1.1.1.3  22-Feb-2000  soda OpenBSD-2.6/arc
 1.1.1.2  23-Jan-2000  soda OpenBSD-2.1/arc
 1.1.1.1  13-Mar-1996  jonathan First commit of Per Fogelstrom's port to the Acer pica r4400/isa machine.
 1.17.2.1  22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.20.2.1  30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.22.2.5  12-Mar-2001  bouyer Sync with HEAD.
 1.22.2.4  05-Jan-2001  bouyer Sync with HEAD
 1.22.2.3  22-Nov-2000  bouyer Sync with HEAD.
 1.22.2.2  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.22.2.1  02-Nov-2000  bouyer file pccons.c was added on branch thorpej_scsipi on 2000-11-20 20:00:32 +0000
 1.24.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.27.4.3  13-Oct-2001  fvdl Revert the t_dev -> t_devvp change in struct tty. The way that tty
structs are currently used (especially by console ttys) aren't
ready for it, and this will require quite a few changes.
 1.27.4.2  10-Oct-2001  fvdl Convert all remaining devices.
 1.27.4.1  01-Oct-2001  fvdl Catch up with -current.
 1.27.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.27.2.2  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.27.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.28.4.4  11-Nov-2002  nathanw Catch up to -current
 1.28.4.3  17-Sep-2002  nathanw Catch up to -current.
 1.28.4.2  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.28.4.1  28-Sep-2001  nathanw file pccons.c was added on branch nathanw_sa on 2002-04-01 07:39:04 +0000
 1.29.4.1  17-May-2002  gehenna Add device switch.
 1.35.2.6  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.35.2.5  24-Jan-2005  skrll Sync with HEAD.
 1.35.2.4  28-Nov-2004  skrll Adapt to branch
 1.35.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.35.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.35.2.1  03-Aug-2004  skrll Sync with HEAD
 1.38.8.1  29-Apr-2005  kent sync with -current
 1.39.8.5  07-Dec-2007  yamt sync with head
 1.39.8.4  27-Oct-2007  yamt sync with head.
 1.39.8.3  03-Sep-2007  yamt sync with head.
 1.39.8.2  30-Dec-2006  yamt sync with head.
 1.39.8.1  21-Jun-2006  yamt sync with head.
 1.42.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.42.10.4  13-May-2006  elad sprinkle some #include <sys/kauth.h> in files that use kauth kpi but
don't include it yet. hopefully this will prevent some fallout.
 1.42.10.3  19-Apr-2006  elad sync with head - hopefully this will work
 1.42.10.2  10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.42.10.1  08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.42.8.3  03-Sep-2006  yamt sync with head.
 1.42.8.2  11-Aug-2006  yamt sync with head
 1.42.8.1  24-May-2006  yamt sync with head.
 1.42.6.2  01-Jun-2006  kardel Sync with head.
 1.42.6.1  22-Apr-2006  simonb Sync with head.
 1.42.4.1  09-Sep-2006  rpaulo sync with head
 1.44.4.1  13-Jul-2006  gdamore Merge from HEAD.
 1.47.4.1  22-Oct-2006  yamt sync with head
 1.47.2.1  18-Nov-2006  ad Sync with head.
 1.48.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.49.10.1  03-Oct-2007  garbled Sync with HEAD
 1.49.4.1  11-Jul-2007  mjf Sync with head.
 1.49.2.3  03-Dec-2007  ad Sync with HEAD.
 1.49.2.2  23-Oct-2007  ad Sync with head.
 1.49.2.1  15-Jul-2007  ad Sync with head.
 1.50.14.2  21-Nov-2007  bouyer Sync with HEAD
 1.50.14.1  25-Oct-2007  bouyer Sync with HEAD.
 1.50.10.2  09-Jan-2008  matt sync with HEAD
 1.50.10.1  06-Nov-2007  matt sync with HEAD
 1.50.8.2  21-Nov-2007  joerg Sync with HEAD.
 1.50.8.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.52.2.1  08-Dec-2007  mjf Sync with HEAD.
 1.53.22.1  18-Jun-2008  simonb Sync with head.
 1.53.20.2  24-Sep-2008  wrstuden Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.
 1.53.20.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.53.18.1  04-May-2009  yamt sync with head.
 1.53.16.1  17-Jun-2008  yamt sync with head.
 1.53.14.2  28-Sep-2008  mjf Sync with HEAD.
 1.53.14.1  29-Jun-2008  mjf Sync with HEAD.
 1.54.2.1  19-Oct-2008  haad Sync with HEAD.
 1.56.8.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.56.2.1  28-Apr-2009  skrll Sync with HEAD.
 1.57.6.1  06-Jun-2011  jruoho Sync with HEAD.
 1.57.4.1  31-May-2011  rmind sync with head
 1.59.16.1  18-May-2014  rmind sync with head
 1.59.12.2  03-Dec-2017  jdolecek update from HEAD
 1.59.12.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.59.2.1  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.60.2.1  10-Aug-2014  tls Rebase.
 1.62.10.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.62.4.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@

RSS XML Feed