Home | History | Annotate | Download | only in pci
History log of /src/sys/dev/pci/amdpm.c
RevisionDateAuthorComments
 1.43  19-Mar-2022  riastradh rnd(9): Adjust IPL of locks used by rndsource callbacks.

These no longer ever run from hard interrupt context or with a spin
lock held, so there is no longer any need to have them at IPL_VM to
block hard interrupts. Instead, lower them to IPL_SOFTSERIAL.
 1.42  30-May-2020  jdolecek remove #if 0'ed pci_conf_print() call
 1.41  30-Apr-2020  riastradh rnd_attach_source calls the callback itself now.

No need for every driver to explicitly call it to prime the pool.

Eliminate now-unused <sys/rndpool.h>.
 1.40  30-Apr-2020  riastradh Don't attach rndsource until it's actually ready to run.
 1.39  13-Apr-2015  riastradh Convert sys/dev to use <sys/rndsource.h>.
 1.38  10-Aug-2014  tls branches: 1.38.4;
Merge tls-earlyentropy branch into HEAD.
 1.37  13-Jun-2013  tls branches: 1.37.6;
Convert the entropy pool framework from pseudo-callout-driven to
soft interrupt driven operation.

Add a polling mode of operation -- now we can ask hardware random number
generators to top us up just when we need it (bcm2835_rng and amdpm
converted as examples).

Fix a stall noticed with repeated reads from /dev/random while testing.
 1.36  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.35  30-Jan-2012  drochner branches: 1.35.6;
Use pci_aprint_devinfo(9) instead of pci_devinfo+aprint_{normal,naive}
where it looks straightforward, and pci_aprint_devinfo_fancy in a few
others where drivers want to supply their own device names instead
of the pcidevs generated one. More complicated cases, where names
are composed at runtime, are left alone for now. It certainly makes
sense to simplify the drivers here rather than inventing a catch-all API.
This should serve as as example for new drivers, and also ensure
consistent output in the AB_QUIET ("boot -q") case. Also, it avoids
excessive stack usage where drivers attach child devices because the
buffer for the device name is not kept on the local stack anymore.
 1.34  07-Feb-2010  pgoyette branches: 1.34.12; 1.34.16;
Recognize the i2c bus on the AMD768 PCI-ISA/LPC Bridge

Resolves PR/42759 - thanks Michael Stapelberg
 1.33  12-May-2009  cegger use device_private().
"looks good" ad@
XXX for the device_t/softc split, please check the driver that no cases have been missed.
 1.32  06-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.31  06-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.30  28-Apr-2008  martin branches: 1.30.14;
Remove clause 3 and 4 from TNF licenses
 1.29  10-Apr-2008  cegger branches: 1.29.2; 1.29.4;
use aprint_*_dev and device_xname
 1.28  19-Oct-2007  ad branches: 1.28.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.27  26-Aug-2007  xtraeme branches: 1.27.2; 1.27.6;
There's no need to add timecounter code inside of __HAVE_TIMECOUNTER
ifdefs.
 1.26  09-Jul-2007  ad branches: 1.26.2; 1.26.6;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.25  05-Feb-2007  jmcneill branches: 1.25.6; 1.25.8;
Disgusting Xbox hack;

The "pci0 dev 1 function 2" aka "System Management" on the nForce chipset
isn't detected on the Xbox. If XBOX is defined and arch_i386_is_xbox is
true, force intrline to 12 and map the system management IO space at
0x8000. We can now call iic_smbus_intr when a system management interrupt
takes place.

While we're here, make amdpm_smbus honour the I2C_F_POLL flag.

The Xbox no longer resets when you press the eject button.
 1.24  06-Jan-2007  jmcneill Make sure that we don't use the amdpm timecounter on Xbox.
 1.23  06-Jan-2007  jmcneill nForce uses a slightly different register offset for the smbus controls;
compensate for this.
 1.22  06-Jan-2007  jmcneill Add nVidia nForce support, tested on Xbox.
 1.21  16-Nov-2006  christos __unused removal on arguments; approved by core.
 1.20  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.19  27-Aug-2006  christos branches: 1.19.2; 1.19.4;
restructure ifdefs
 1.18  11-Jul-2006  drochner include machine/bus.h explicitely, fixes build problem
 1.17  11-Jul-2006  drochner use timecounter code in dev/ic/acpipmtimer.*,
kill interface attribute in device declaration
 1.16  10-Jul-2006  xtraeme Attach amdpm timer on AMD8111 too, as was suggested by Nicolas Joly.
 1.15  10-Jul-2006  christos PR/33968: Nicolas Joly: amdpm(4) timer, fix and AMD8111 support
Refactor the code to use different variable names to hold each conf register
and avoid reading/witing the conf space multiple times.
 1.14  21-Jun-2006  explorer formatting nit, newline, print device name
 1.13  21-Jun-2006  explorer Actually set amdpm_timecounter.tc_priv before using it later.
 1.12  17-Jun-2006  xtraeme Support for the 24/32bit timer in the AMD 768 Power Management
Controller, to try it use `sysctl -w kern.timecounter.hardware=amdpm`.

From OpenBSD.
 1.11  19-Feb-2006  tls branches: 1.11.2; 1.11.8; 1.11.10;
Add support for i2c bus on AMD-8111 used on many Opteron server motherboards,
and ADT 7463c thermal and voltage monitor found on the Tyan S2881 and S2882-D
(and probably other boards as well). We do not currently support any kind
of detection of the i2c address of the thermal monitor; it appears to be
at 0x2D on the S2881 and 0x2E on the S2882-D (kernel config examples
forthcoming).

From PR kern/32463 submitted by Anil Gopinath, anil_public@yahoo.com.
 1.10  28-Jan-2006  kleink branches: 1.10.2; 1.10.4;
Add support for the AMD8111 RNG; from Nicolas Joly in PR kern/32284.
 1.9  04-Dec-2005  christos branches: 1.9.2;
PR/32220: Murray Armfield: Enable AMD768 random no generator.
 1.8  28-Jun-2005  thorpej branches: 1.8.2;
Use ANSI function decls and static.
 1.7  01-Sep-2003  tls branches: 1.7.14;
Revert previous change, which was wrong. As Enami points out, we really do
want the NO_ESTIMATE flag here, because if the source doesn't have it,
rnd_add_data will *use the time the data was added directly as entropy*,
which is not a good idea either for a hardware RNG that works like this
one (periodically polled by the driver) or, really, like any other that I've
seen, because even for "interrupt when ready" RNGs the data rate (and thus
interrupt time) will vary only slightly for a given RNG configuration over
time, if at all.

The data we add _is_ counted into the pool estimage because we directly
pass in an entropy estimate.

The overloading of the NO_ESTIMATE flag with this meaning seems, to me, like
a design bug (albeit easily fixed) in the rng interface; but until that's
changed, we need to use it here.
 1.6  12-Aug-2003  tls Remove RND_FLAG_NO_ESTIMATE and comment claiming we can't estimate (which
means "count", in this context) the entropy we're adding because we poll the
device periodically. Sure, we poll it periodically, but it's a hardware
RNG -- the data returned should be random no matter when we read the
register!
 1.5  31-Jan-2003  thorpej branches: 1.5.2;
Use aprint_*().
 1.4  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.3  30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.2  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.1  02-Jun-2002  enami branches: 1.1.2; 1.1.4; 1.1.6;
Collect random number from AMD 768MPX power management controller.
 1.1.6.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.1.6.2  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.1  02-Jun-2002  jdolecek file amdpm.c was added on branch kqueue on 2002-06-23 17:47:32 +0000
 1.1.4.2  20-Jun-2002  gehenna catch up with -current.
 1.1.4.1  02-Jun-2002  gehenna file amdpm.c was added on branch gehenna-devsw on 2002-06-20 16:33:29 +0000
 1.1.2.3  18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2  20-Jun-2002  nathanw Catch up to -current.
 1.1.2.1  02-Jun-2002  nathanw file amdpm.c was added on branch nathanw_sa on 2002-06-20 03:45:19 +0000
 1.5.2.5  11-Dec-2005  christos Sync with head.
 1.5.2.4  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1  03-Aug-2004  skrll Sync with HEAD
 1.7.14.3  20-Feb-2006  tron Pull up following revision(s) (requested by tls in ticket #1179):
sys/dev/pci/amdpm.c: revision 1.11
sys/dev/i2c/files.i2c: revision 1.7
sys/dev/i2c/adt7463.c: revision 1.1
sys/dev/pci/files.pci: revision 1.242 via patch
sys/dev/pci/amdpmvar.h: revision 1.1
sys/dev/i2c/adt7463reg.h: revision 1.1
sys/dev/DEVNAMES: revision 1.192 via patch
sys/dev/pci/amdpm_smbus.c: revision 1.1
sys/dev/pci/amdpm_smbusreg.h: revision 1.1
Add support for i2c bus on AMD-8111 used on many Opteron server motherboards,
and ADT 7463c thermal and voltage monitor found on the Tyan S2881 and S2882-D
(and probably other boards as well). We do not currently support any kind
of detection of the i2c address of the thermal monitor; it appears to be
at 0x2D on the S2881 and 0x2E on the S2882-D (kernel config examples
forthcoming).
From PR kern/32463 submitted by Anil Gopinath, anil_public@yahoo.com.
 1.7.14.2  05-Feb-2006  riz Pull up following revision(s) (requested by tls in ticket #1159):
sys/dev/pci/amdpm.c: revision 1.10
share/man/man4/amdpm.4: revision 1.4
Add support for the AMD8111 RNG; from Nicolas Joly in PR kern/32284.
 1.7.14.1  05-Feb-2006  riz Pull up following revision(s) (requested by tls in ticket #1158):
sys/dev/pci/amdpm.c: revision 1.9
PR/32220: Murray Armfield: Enable AMD768 random no generator.
 1.8.2.5  27-Oct-2007  yamt sync with head.
 1.8.2.4  03-Sep-2007  yamt sync with head.
 1.8.2.3  26-Feb-2007  yamt sync with head.
 1.8.2.2  30-Dec-2006  yamt sync with head.
 1.8.2.1  21-Jun-2006  yamt sync with head.
 1.9.2.2  01-Mar-2006  yamt sync with head.
 1.9.2.1  01-Feb-2006  yamt sync with head.
 1.10.4.1  22-Apr-2006  simonb Sync with head.
 1.10.2.1  09-Sep-2006  rpaulo sync with head
 1.11.10.1  13-Jul-2006  gdamore Merge from HEAD.
 1.11.8.1  19-Jun-2006  chap Sync with head.
 1.11.2.3  03-Sep-2006  yamt sync with head.
 1.11.2.2  11-Aug-2006  yamt sync with head
 1.11.2.1  26-Jun-2006  yamt sync with head.
 1.19.4.2  10-Dec-2006  yamt sync with head.
 1.19.4.1  22-Oct-2006  yamt sync with head
 1.19.2.3  09-Feb-2007  ad Sync with HEAD.
 1.19.2.2  12-Jan-2007  ad Sync with head.
 1.19.2.1  18-Nov-2006  ad Sync with head.
 1.25.8.1  11-Jul-2007  mjf Sync with head.
 1.25.6.3  23-Oct-2007  ad Sync with head.
 1.25.6.2  09-Oct-2007  ad Sync with head.
 1.25.6.1  01-Jul-2007  ad Adapt to callout API change.
 1.26.6.2  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.26.6.1  03-Sep-2007  jmcneill Sync with HEAD.
 1.26.2.1  03-Sep-2007  skrll Sync with HEAD.
 1.27.6.1  25-Oct-2007  bouyer Sync with HEAD.
 1.27.2.1  06-Nov-2007  matt sync with HEAD
 1.28.16.1  02-Jun-2008  mjf Sync with HEAD.
 1.29.4.3  11-Mar-2010  yamt sync with head
 1.29.4.2  16-May-2009  yamt sync with head
 1.29.4.1  16-May-2008  yamt sync with head.
 1.29.2.1  18-May-2008  yamt sync with head.
 1.30.14.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.34.16.1  18-Feb-2012  mrg merge to -current.
 1.34.12.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.34.12.2  30-Oct-2012  yamt sync with head
 1.34.12.1  17-Apr-2012  yamt sync with head
 1.35.6.4  03-Dec-2017  jdolecek update from HEAD
 1.35.6.3  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.35.6.2  23-Jun-2013  tls resync from head
 1.35.6.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.37.6.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.38.4.1  06-Jun-2015  skrll Sync with HEAD

RSS XML Feed