NetBSD Problem Report #32284
From njoly@pasteur.fr Mon Dec 12 10:09:26 2005
Return-Path: <njoly@pasteur.fr>
Received: from electre.pasteur.fr (electre.pasteur.fr [157.99.64.120])
by narn.netbsd.org (Postfix) with ESMTP id AC3D463B8CD
for <gnats-bugs@gnats.NetBSD.org>; Mon, 12 Dec 2005 10:09:25 +0000 (UTC)
Message-Id: <20051212100923.F115E6B404@lanfeust.sis.pasteur.fr>
Date: Mon, 12 Dec 2005 11:09:23 +0100 (CET)
From: njoly@pasteur.fr
Reply-To: njoly@pasteur.fr
To: gnats-bugs@netbsd.org
Subject: amdpm(4) support for AMD8111 chipset
X-Send-Pr-Version: 3.95
>Number: 32284
>Category: kern
>Synopsis: amdpm(4) support for AMD8111 chipset
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Dec 12 10:10:00 +0000 2005
>Closed-Date: Sat Jan 28 23:35:33 +0000 2006
>Last-Modified: Sun Feb 05 17:30:03 +0000 2006
>Originator: Nicolas Joly
>Release: NetBSD 3.99.14
>Organization:
Institut Pasteur, Paris.
>Environment:
System: NetBSD lanfeust.sis.pasteur.fr 3.99.14 NetBSD 3.99.14 (LANFEUST) #5: Mon Dec 12 10:45:08 CET 2005 njoly@lanfeust.sis.pasteur.fr:/local/src/NetBSD/obj/amd64/sys/arch/amd64/compile/LANFEUST amd64
Architecture: x86_64
Machine: amd64
>Description:
The AMD8111 chipset has a `Power Management Controller' (currently named
as `ACPI Controller' in pcidevs) which is compatible with amdpm(4).
njoly@lanfeust [~]> pcictl pci0 dump -d 7 -f 3 | head
PCI configuration registers:
Common header:
0x00: 0x746b1022 0x02800000 0x06800005 0x00004000
Vendor Name: Advanced Micro Devices (0x1022)
Device Name: AMD8111 ACPI Controller (0x746b)
Command register: 0x0000
I/O space accesses: off
Memory space accesses: off
Bus mastering: off
The following patch allows use of random number generator on AMD8111 chipset.
njoly@lanfeust [~]> dmesg | grep amdpm
amdpm0 at pci0 dev 7 function 3: Advanced Micro Devices AMD8111 ACPI Controller (rev. 0x05)
amdpm0: random number generator enabled (apprx. 58ms)
njoly@lanfeust [~]> sudo rndctl -l
Source Bits Type Flags
cd0 0 disk estimate, collect
wd1 256 disk estimate, collect
wd0 3200 disk estimate, collect
fd0 0 disk estimate, collect
pms0 62 tty estimate, collect
pckbd0 0 tty estimate, collect
amdpm0 3798848 rng collect
While here, i added some missing device description.
>How-To-Repeat:
n/a
>Fix:
Index: sys/dev/pci/amdpm.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/amdpm.c,v
retrieving revision 1.9
diff -u -r1.9 amdpm.c
--- sys/dev/pci/amdpm.c 4 Dec 2005 17:47:33 -0000 1.9
+++ sys/dev/pci/amdpm.c 12 Dec 2005 09:50:17 -0000
@@ -85,9 +85,15 @@
{
struct pci_attach_args *pa = aux;
- if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_AMD &&
- PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_AMD_PBC768_PMC)
+ if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_AMD)
+ return (0);
+
+ switch (PCI_PRODUCT(pa->pa_id)) {
+ case PCI_PRODUCT_AMD_PBC768_PMC:
+ case PCI_PRODUCT_AMD_PBC8111_ACPI:
return (1);
+ }
+
return (0);
}
@@ -96,12 +102,14 @@
{
struct amdpm_softc *sc = (struct amdpm_softc *) self;
struct pci_attach_args *pa = aux;
+ char devinfo[256];
pcireg_t reg;
u_int32_t pmreg;
int i;
aprint_naive("\n");
- aprint_normal("\n");
+ pci_devinfo(pa->pa_id, pa->pa_class, 0, devinfo, sizeof(devinfo));
+ aprint_normal(": %s (rev. 0x%02x)\n", devinfo, PCI_REVISION(pa->pa_class));
sc->sc_pc = pa->pa_pc;
sc->sc_tag = pa->pa_tag;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: kleink@netbsd.org
State-Changed-When: Sat, 28 Jan 2006 23:35:33 +0000
State-Changed-Why:
Fixed, thanks. (I've also added a note to the manual page.)
From: Klaus Klein <kleink@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: PR/32284 CVS commit: src
Date: Sat, 28 Jan 2006 23:31:24 +0000 (UTC)
Module Name: src
Committed By: kleink
Date: Sat Jan 28 23:31:24 UTC 2006
Modified Files:
src/share/man/man4: amdpm.4
src/sys/dev/pci: amdpm.c
Log Message:
Add support for the AMD8111 RNG; from Nicolas Joly in PR kern/32284.
To generate a diff of this commit:
cvs rdiff -r1.3 -r1.4 src/share/man/man4/amdpm.4
cvs rdiff -r1.9 -r1.10 src/sys/dev/pci/amdpm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Jeff Rizzo <riz@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: PR/32284 CVS commit: [netbsd-3] src
Date: Sun, 5 Feb 2006 17:28:54 +0000 (UTC)
Module Name: src
Committed By: riz
Date: Sun Feb 5 17:28:54 UTC 2006
Modified Files:
src/share/man/man4 [netbsd-3]: amdpm.4
src/sys/dev/pci [netbsd-3]: amdpm.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -r1.3 -r1.3.6.1 src/share/man/man4/amdpm.4
cvs rdiff -r1.7.14.1 -r1.7.14.2 src/sys/dev/pci/amdpm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.