Home | History | Annotate | Download | only in ixp12x0
History log of /src/sys/arch/arm/ixp12x0/ixp12x0_com.c
RevisionDateAuthorComments
 1.50  21-Jul-2022  andvar fix typos in comments and log messages, mainly s/intrrupt/interrupt/.
 1.49  20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.48  10-Nov-2019  chs branches: 1.48.8;
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.47  13-Apr-2015  riastradh branches: 1.47.18;
MD rnd.h cleanups. Please let me know if I broke anything!
 1.46  15-Nov-2014  christos branches: 1.46.2;
centralize the call unit / dialout macros
 1.45  10-Aug-2014  tls Merge tls-earlyentropy branch into HEAD.
 1.44  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.43  16-Mar-2014  dholland branches: 1.43.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.42  12-Nov-2012  skrll branches: 1.42.2;
C99 types
 1.41  27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.40  02-Feb-2012  tls branches: 1.40.6;
Entropy-pool implementation move and cleanup.

1) Move core entropy-pool code and source/sink/sample management code
to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
avoid expensive operations on disabled entropy sources; make the
rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
system events, and skew between clocks, with a sample implementation
for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files). Tested with release
builds on amd64 and evbarm and live testing on amd64.
 1.39  01-Jul-2011  dyoung branches: 1.39.2; 1.39.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.38  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.37  15-Nov-2010  uebayasi branches: 1.37.2;
struct lwp * deref (for kauth).
 1.36  14-Mar-2009  dsl branches: 1.36.4;
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  14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.34  11-Jun-2008  cegger branches: 1.34.4; 1.34.10;
use device_lookup_private to get softc
 1.33  28-Apr-2008  martin branches: 1.33.2; 1.33.4;
Remove clause 3 and 4 from TNF licenses
 1.32  08-Jan-2008  matt branches: 1.32.6; 1.32.8; 1.32.10;
As of this commit, all arm32 kernel now build.
 1.31  19-Nov-2007  ad branches: 1.31.6;
- Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
 1.30  04-Mar-2007  christos branches: 1.30.2; 1.30.16; 1.30.18; 1.30.20; 1.30.22; 1.30.26; 1.30.28;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.29  01-Oct-2006  elad branches: 1.29.4;
More from Matt Fleming:

Adapt to KAUTH_DEVICE_TTY_PRIVSET and KAUTH_DEVICE_TTY_OPEN.
 1.28  01-Oct-2006  elad Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks!
 1.27  23-Jul-2006  ad branches: 1.27.4; 1.27.6;
Use the LWP cached credentials where sane.
 1.26  14-May-2006  elad integrate kauth.
 1.25  26-Mar-2006  thorpej Use device_unit().
 1.24  08-Mar-2006  he branches: 1.24.2;
Remove yet another instance of the macro triplet SET/CLR/ISSET, now
found in <sys/types.h>.
 1.23  20-Feb-2006  thorpej branches: 1.23.2; 1.23.4;
Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
directly.
 1.22  11-Dec-2005  christos branches: 1.22.2; 1.22.4; 1.22.6;
merge ktrace-lwp.
 1.21  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.20  04-Jun-2005  he branches: 1.20.2;
Fix shadowing warnings by renaming local variables and by
removing parameter names in function prototype.
 1.19  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.18  29-Jun-2003  fvdl branches: 1.18.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.17  29-Jun-2003  ichiro struct proc * -> struct lwp *
 1.16  25-Mar-2003  igy Add __KERNEL_RCSID tags
 1.15  06-Mar-2003  igy catch up to consdev update
 1.14  06-Mar-2003  igy Remove #ifdef __HAVE_GENERIC_SOFT_INTERRUPTS switch and old interrupt
support. Ixp12x0 port always uses generic soft interrupt.
 1.13  22-Feb-2003  igy correct physical/virtual address handling

- to identify device instance, using hardware address.
- when console accesses device, using statically mapped address.
- when tty accesses device, using handler given by bus_space_map().
 1.12  21-Feb-2003  igy Don't use dv_unit to determine console. Back to comparing iobase again.
We always assume ixpcom is at statically mapped address (0xf0000000).
 1.11  21-Feb-2003  igy implement ioctl
 1.10  17-Feb-2003  ichiro files.ixp12x0
no need device ixpcom in evbarm/conf/files.evbarm move it to
arm/ixp12x0/files.ixp12x0

ixp12x0_com.c:
some fix around address handling
1. Do not call bus_space_map() in ixpcominit(). Calling bus_space_map()
is not safe here, because bus_space_map() calls uvm_km_valloc() but
uvm is not yet initialized.
2. Use dv_unit to determine console instead comparering iobase.
Now you can attach ixpcom0 with physical address like this:
ixpcom* at ixpsip? addr 0x90000000 size 0x4000
Statically mapped address (0xf0000000) is still usable.

ixp12x0_clk:
1. access PLL_CFG register via bus_space
2. Make the delay() working correctly. (bug fix)
3. Start the timer device without interrupt on attach time.
Now delay() called before cpu_initclocks() works fine.

ixp12x0_pci:
1.Mapping PCI type0/1 configuration space to the upper address.
2."PCI I/O Cycle Access" mapping to same virtual address(VA==PA)
but size of this mapping increase to 1MByte because fails
cause couldnt set L2 table.
3.use bus_space address handling in ixp12x0_pci.c.
 1.9  03-Dec-2002  ichiro initialize ixpcomconsaddr
use splserial()
fix IXPCOM registers
 1.8  02-Dec-2002  ichiro use bus_space map
 1.7  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.6  09-Oct-2002  thorpej branches: 1.6.2;
Make this compile with strict prototypes.
 1.5  27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.4  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.3  21-Jul-2002  ichiro branches: 1.3.2; 1.3.4;
some bug fix and cosmetic changes
 1.2  20-Jul-2002  ichiro branches: 1.2.2;
attach/match separated from ixp12x0_com
Some bug of com driver have been improved.
 1.1  15-Jul-2002  ichiro add support for ixp12x0
 1.2.2.3  30-Aug-2002  gehenna catch up with -current.
 1.2.2.2  21-Jul-2002  gehenna Add a character device switch.
 1.2.2.1  20-Jul-2002  gehenna file ixp12x0_com.c was added on branch gehenna-devsw on 2002-07-21 12:02:52 +0000
 1.3.4.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.3.4.2  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.4.1  21-Jul-2002  jdolecek file ixp12x0_com.c was added on branch kqueue on 2002-09-06 08:32:50 +0000
 1.3.2.5  11-Dec-2002  thorpej Sync with HEAD.
 1.3.2.4  11-Nov-2002  nathanw Catch up to -current
 1.3.2.3  18-Oct-2002  nathanw Catch up to -current.
 1.3.2.2  17-Sep-2002  nathanw Catch up to -current.
 1.3.2.1  21-Jul-2002  nathanw file ixp12x0_com.c was added on branch nathanw_sa on 2002-09-17 21:13:34 +0000
 1.6.2.1  24-Oct-2002  bjh21 Sync with trunk.
 1.18.2.5  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.18.2.4  17-Jan-2005  skrll Adapt to branch.
 1.18.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.18.2.1  03-Aug-2004  skrll Sync with HEAD
 1.20.2.5  21-Jan-2008  yamt sync with head
 1.20.2.4  07-Dec-2007  yamt sync with head
 1.20.2.3  03-Sep-2007  yamt sync with head.
 1.20.2.2  30-Dec-2006  yamt sync with head.
 1.20.2.1  21-Jun-2006  yamt sync with head.
 1.22.6.2  01-Jun-2006  kardel Sync with head.
 1.22.6.1  22-Apr-2006  simonb Sync with head.
 1.22.4.1  09-Sep-2006  rpaulo sync with head
 1.22.2.1  01-Mar-2006  yamt sync with head.
 1.23.4.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.23.4.3  19-Apr-2006  elad sync with head - hopefully this will work
 1.23.4.2  10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.23.4.1  08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.23.2.4  11-Aug-2006  yamt sync with head
 1.23.2.3  24-May-2006  yamt sync with head.
 1.23.2.2  01-Apr-2006  yamt sync with head.
 1.23.2.1  13-Mar-2006  yamt sync with head.
 1.24.2.2  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.24.2.1  28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.27.6.1  22-Oct-2006  yamt sync with head
 1.27.4.1  18-Nov-2006  ad Sync with head.
 1.29.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.30.28.2  18-Feb-2008  mjf Sync with HEAD.
 1.30.28.1  08-Dec-2007  mjf Sync with HEAD.
 1.30.26.1  21-Nov-2007  bouyer Sync with HEAD
 1.30.22.1  09-Jan-2008  matt sync with HEAD
 1.30.20.2  20-Jan-2008  chris Sync to HEAD.
 1.30.20.1  01-Jan-2008  chris Sync with HEAD.
 1.30.18.1  21-Nov-2007  joerg Sync with HEAD.
 1.30.16.2  28-Feb-2008  rjs Sync with HEAD.
 1.30.16.1  26-Dec-2007  rjs Sync with HEAD.
 1.30.2.1  03-Dec-2007  ad Sync with HEAD.
 1.31.6.1  08-Jan-2008  bouyer Sync with HEAD
 1.32.10.2  04-May-2009  yamt sync with head.
 1.32.10.1  16-May-2008  yamt sync with head.
 1.32.8.2  17-Jun-2008  yamt sync with head.
 1.32.8.1  18-May-2008  yamt sync with head.
 1.32.6.2  29-Jun-2008  mjf Sync with HEAD.
 1.32.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.33.4.1  18-Jun-2008  simonb Sync with head.
 1.33.2.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.34.10.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.34.4.1  28-Apr-2009  skrll Sync with HEAD.
 1.36.4.2  31-May-2011  rmind sync with head
 1.36.4.1  05-Mar-2011  rmind sync with head
 1.37.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.39.6.1  18-Feb-2012  mrg merge to -current.
 1.39.2.4  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.39.2.3  16-Jan-2013  yamt sync with (a bit old) head
 1.39.2.2  30-Oct-2012  yamt sync with head
 1.39.2.1  17-Apr-2012  yamt sync with head
 1.40.6.3  03-Dec-2017  jdolecek update from HEAD
 1.40.6.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.40.6.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.42.2.1  18-May-2014  rmind sync with head
 1.43.2.2  10-Aug-2014  tls Rebase.
 1.43.2.1  07-Apr-2014  tls Be a little more clear and consistent about harvesting entropy from devices:

1) deprecate RND_FLAG_NO_ESTIMATE

2) define RND_FLAG_COLLECT_TIME, RND_FLAG_COLLECT_VALUE

3) define RND_FLAG_ESTIMATE_TIME, RND_FLAG_ESTIMATE_VALUE

4) define RND_FLAG_DEFAULT: RND_FLAG_COLLECT_TIME|
RND_FLAG_COLLECT_VALUE|RND_FLAG_ESTIMATE_TIME

5) Make entropy harvesting from environmental sensors a little more generic
and remove it from individual sensor drivers.

6) Remove individual open-coded delta-estimators for values from a few
places in the tree (uvm, environmental drivers).

7) 0 -> RND_FLAG_DEFAULT, actually gather entropy from various drivers
that had stubbed out code, other minor cleanups.
 1.46.2.1  06-Jun-2015  skrll Sync with HEAD
 1.47.18.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.48.8.1  14-Dec-2020  thorpej Sync w/ HEAD.

RSS XML Feed