Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Mar 2005 20:09:06 +0100
From:      Bruno Ducrot <ducrot@poupinou.org>
To:        "Alexander S. Usov" <A.S.Usov@kvi.nl>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Using cpufreq
Message-ID:  <20050314190906.GK2298@poupinou.org>
In-Reply-To: <d118pf$pq0$2@sea.gmane.org>
References:  <d0s9te$e8n$1@sea.gmane.org> <20050311183150.T72922@carver.gumbysoft.com> <d118pf$pq0$2@sea.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Mar 13, 2005 at 12:40:19PM +0100, Alexander S. Usov wrote:
> Doug White wrote:
> 
> > On Fri, 11 Mar 2005, Alexander S. Usov wrote:
> > 
> >> Hi!
> >>
> >> I have upgraded to 5.4-PRERELEASE this weekend, and can't figure out
> >> how to use/enable cpufreq framework.
> >>
> >> With my standart kernel config I have no cpufreq.ko not acpi_perf.ko.
> >> Adding "device cpufreq" (mentioned in cpufreq(4)) to the kernel config
> >> does not work either.
> > 
> > I don't believe any of the CPU-specific drivers have been ported to
> > RELENG_5 yet. You may be able to copy them out of -CURRENT and build them.
> > No guarantees.
> 
> Can you suggest what exactly should be copied from there?

"somewhere" (~myuser/cpufreq/ for example) do something like this:

cvs co src/sys/dev/acpica/acpi_perf.c
cvs co -P src/sys/dev/cpufreq
cvs co -P src/sys/i386/cpufreq

Create two directory:
mkdir acpi_perf
mkdir cpufreq

Then:
cp src/sys/dev/acpica/acpi_perf.c acpi_perf/
cp src/sys/dev/cpufreq/*.c cpufreq
cp src/sys/i386/cpufreq/*.c cpufreq

Remove src (rm -rf src), then for each of directories
acpi_perf, cpufreq; create a makefile:

For acpi_perf/Makefile:

CFLAGS+=	-I@/contrib/dev/acpica
KMOD=		acpi_perf
WARNS?=		2
SRCS=		acpi_perf.c
SRCS+=		acpi_if.h bus_if.h cpufreq_if.h device_if.h opt_acpi.h \
		pci_if.h

.include <bsd.kmod.mk>

and for cpufreq/Makefile:

KMOD=		cpufreq
WARNS?=		2
SRCS=		ichss.c est.c p4tcc.c
SRCS+=		bus_if.h cpufreq_if.h device_if.h pci_if.h

.include <bsd.kmod.mk>

Go to each directories, issue a make install
Then try to kldload acpi_perf and kldload cpufreq.
If that ok, you may want to add to /boot/loader.conf

acpi_perf_load="YES"
cpufreq_load="YES"

Note that ichss require loading at boot.

Note also that you *must* not compile kernel with P4TCC support
(or do not include p4tcc.c in the SRCS line in the above Makefile).

And if you have a powernow capable processor, you may want to try
http://www.poupinou.org/cpufreq/bsd/powernow.tar.gz

(which may require acpi_perf sometimes if it failed if the provided
BIOS table failed).

Hope this help,

-- 
Bruno Ducrot

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050314190906.GK2298>