NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/38723: Additional AMD PowerNow status bits for Family 10h processors
The following reply was made to PR bin/38723; it has been noted by GNATS.
From: Paul Goyette <paul%whooppee.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: bin/38723: Additional AMD PowerNow status bits for Family 10h
processors
Date: Wed, 21 May 2008 12:51:00 -0700 (PDT)
It also seems that the buffer being used for bitmask_snprintf() isn't
working. Changing it to a malloc'd buffer of size MAXPATHLEN (similar
to the other buffers being passed to bitmask_snprintF()) works. Here's
an updated diff:
Index: i386.c
===================================================================
RCS file: /cvsroot/src/usr.sbin/cpuctl/arch/i386.c,v
retrieving revision 1.5
diff -u -p -r1.5 i386.c
--- i386.c 21 May 2008 01:12:12 -0000 1.5
+++ i386.c 21 May 2008 19:45:26 -0000
@@ -1927,7 +1927,7 @@ powernow_probe(struct cpu_info *ci)
powernow_probe(struct cpu_info *ci)
{
uint32_t regs[4];
- char line[80];
+ char *line;
x86_cpuid(0x80000000, regs);
@@ -1936,8 +1936,11 @@ powernow_probe(struct cpu_info *ci)
return;
x86_cpuid(0x80000007, regs);
- bitmask_snprintf(regs[3], "\20\6STC\5TM\4TTP\3VID\2FID\1TS", line,
- sizeof(line));
+ line = malloc(MAXPATHLEN);
+ bitmask_snprintf(regs[3], "\20\11TscInv\10HwPState\7Clk100MHz"
+ "\6STC\5TM\4TTP\3VID\2FID\1TS", line,
+ MAXPATHLEN);
aprint_normal_dev(ci->ci_dev, "AMD Power Management features: %s\n",
line);
+ free(line);
}
Home |
Main Index |
Thread Index |
Old Index