Gigabyte 970A-UD3P and hwpstate problem

Mario Lobo lobo at bsd.com.br
Wed Aug 5 12:59:29 UTC 2015


On Tue, 04 Aug 2015 13:18:21 -0700
John Baldwin <jhb at freebsd.org> wrote:

> On Sunday, July 12, 2015 03:23:21 PM Mario Lobo wrote:
> > On Sat, 11 Jul 2015 15:50:06 +0200
> > "Herbert J. Skuhra" <herbert at oslo.ath.cx> wrote:
> > 
> > > On Fri, Jul 10, 2015 at 09:37:52PM -0300, Mario Lobo wrote:
> > > > Hi;
> > > > 
> > > > I just installed a Gigabyte 970A-UD3P mobo and updated BIOS to
> > > > the latest version but the problem also showed with the previous
> > > > version.
> > > > 
> > > > Here is my amd64 10-STABLE setup:
> > > > 
> > > > FreeBSD 10.2-PRERELEASE #0 r285207M: Tue Jul  7 00:11:01 BRT
> > > > 2015 amd64
> > > > 
> > > > CPU: AMD FX-8320E Eight-Core Processor (3214.93-MHz K8-class
> > > > CPU) Origin="AuthenticAMD"  Id=0x600f20  Family=0x15  Model=0x2
> > > > Stepping=0
> > > > Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
> > > > Features2=0x3e98320b<SSE3,PCLMULQDQ,MON,SSSE3,FMA,CX16,SSE4.1,SSE4.2,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C>
> > > > AMD
> > > > Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
> > > > AMD
> > > > Features2=0x1ebbfff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,XOP,SKINIT,WDT,LWP,FMA4,TCE,NodeId,TBM,Topology,PCXC,PNXC>
> > > > Structured Extended Features=0x8<BMI1> SVM:
> > > > NP,NRIP,VClean,AFlush,DAssist,NAsids=65536 TSC: P-state
> > > > invariant, performance statistics real memory  = 17179869184
> > > > (16384 MB) [snip] ACPI BIOS Warning (bug): Optional FADT field
> > > > Pm2ControlBlock has zero address or length:
> > > > 0x0000000000000000/0x1 (20150515/tbfadt-673) [snip]
> > > > hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff
> > > > on acpi0
> > > > 
> > > > The problem:
> > > > 
> > > > powerd: no cpufreq(4) support -- aborting: No such file or
> > > > directory /etc/rc: WARNING: failed to start powerd
> > > 
> > > Could this be your problem:
> > > 
> > > r276986 | nwhitehorn | 2015-01-11 18:10:07 +0100 (søn, 11 jan
> > > 2015) | 8 lines
> > > 
> > > MFC r265329:
> > > Disable ACPI and P4TCC throttling by default, following
> > > discussion on freebsd-current. These CPU speed control techniques
> > > are usually unhelpful at best. For now, continue building the
> > > relevant code into GENERIC so that it can trivially be re-enabled
> > > at runtime if anyone wants it.
> > > 
> > > Relnotes:       yes
> > > 
> > > % svnlite diff -c 276986 sys/amd64/conf/GENERIC.hints 
> > > Index: sys/amd64/conf/GENERIC.hints
> > > ===================================================================
> > > --- sys/amd64/conf/GENERIC.hints        (revision 276985)
> > > +++ sys/amd64/conf/GENERIC.hints        (revision 276986)
> > > @@ -31,3 +31,5 @@
> > >  hint.attimer.0.port="0x40"
> > >  hint.attimer.0.irq="0"
> > >  hint.wbwd.0.at="isa"
> > > +hint.acpi_throttle.0.disabled="1"
> > > +hint.p4tcc.0.disabled="1"
> > > 
> > > Does it work if your unset or remove those lines
> > > from /boot/device.hints?
> > > 
> > 
> > YEEESSS ! Thanks for pointing that out!
> > 
> > I have these commented on my loader.conf but I didn't know they were
> > active somewhere else.
> > 
> > As far as cpufreq/powerd goes, it's working now and frequencies are
> > being throttled but still no cool'n'quiet/hwpstate0 showing on
> > dmesg. acpi_throttle attaches to cpu0 but not to the others.
> 
> The acpi_throttle isn't really that helpful though.  You probably want
> to try to add support for your CPU to the hwpstate driver instead and
> leave acpi_throttle disabled.
> 
> Can you run 'kgdb' as root and get the output of 'p amd_pminfo'?

(kgdb) p amd_pminfo
$1 = 2009

> Hmm, do you have an acpi_perf0 device?  If not, then your CPU isn't
> supported without BIOS help.

No acpi_perf0 device present

> First check to see if there are any BIOS
> options to control CPU throttling that are currently disabled.

The only BIOS option that deals with throttling is Cool'n'Quiet, which
is enabled.

I get this though:

[~]>dmesg -a | grep acpi_    
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
acpi_button0: <Power Button> on acpi0
acpi_throttle0: <ACPI CPU Throttling> on cpu0

acpi_throttle1: <ACPI CPU Throttling> on cpu1
acpi_throttle1: failed to attach P_CNT
device_attach: acpi_throttle1 attach returned 6
acpi_throttle2: <ACPI CPU Throttling> on cpu2
acpi_throttle2: failed to attach P_CNT
device_attach: acpi_throttle2 attach returned 6
acpi_throttle3: <ACPI CPU Throttling> on cpu3
acpi_throttle3: failed to attach P_CNT
device_attach: acpi_throttle3 attach returned 6
acpi_throttle4: <ACPI CPU Throttling> on cpu4
acpi_throttle4: failed to attach P_CNT
device_attach: acpi_throttle4 attach returned 6
acpi_throttle5: <ACPI CPU Throttling> on cpu5
acpi_throttle5: failed to attach P_CNT
device_attach: acpi_throttle5 attach returned 6
acpi_throttle6: <ACPI CPU Throttling> on cpu6
acpi_throttle6: failed to attach P_CNT
device_attach: acpi_throttle6 attach returned 6
acpi_throttle7: <ACPI CPU Throttling> on cpu7
acpi_throttle7: failed to attach P_CNT
device_attach: acpi_throttle7 attach returned 6


Only acpi_throttle0 gets hooked

dev.acpi_throttle.0.freq_settings: 10000/-1 8750/-1 7500/-1 6250/-1
5000/-1 3750/-1 2500/-1 1250/-1 dev.acpi_throttle.0.%parent: cpu0
dev.acpi_throttle.0.%pnpinfo: 
dev.acpi_throttle.0.%location: 
dev.acpi_throttle.0.%driver: acpi_throttle
dev.acpi_throttle.0.%desc: ACPI CPU Throttling
dev.acpi_throttle.%parent

And frequencies ARE getting throttled:

dev.cpufreq.0.%parent: cpu0
dev.cpufreq.0.%pnpinfo: 
dev.cpufreq.0.%location: 
dev.cpufreq.0.%driver: cpufreq
dev.cpufreq.0.%desc: 
dev.cpufreq.%parent: 
dev.acpi_throttle.0.freq_settings: 10000/-1 8750/-1 7500/-1 6250/-1
5000/-1 3750/-1 2500/-1 1250/-1 
dev.cpu.0.freq_levels: 3214/-1 2812/-1 2410/-1 2008/-1 1607/-1 1205/-1
803/-1

dev.cpu.0.freq: 1607
dev.cpu.0.freq: 2008
dev.cpu.0.freq: 2410
dev.cpu.0.freq: 3214
dev.cpu.0.freq: 1205
dev.cpu.0.freq: 803


-- 
Mario Lobo
http://www.mallavoodoo.com.br
FreeBSD since 2.2.8 [not Pro-Audio.... YET!!]
 
"UNIX was not designed to stop you from doing stupid things, 
because that would also stop you from doing clever things."


More information about the freebsd-hackers mailing list