From owner-freebsd-current@FreeBSD.ORG Mon Mar 14 19:09:20 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 60A0816A4CE for ; Mon, 14 Mar 2005 19:09:20 +0000 (GMT) Received: from poup.poupinou.org (poup.poupinou.org [195.101.94.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id AFAEB43D55 for ; Mon, 14 Mar 2005 19:09:19 +0000 (GMT) (envelope-from ducrot@poupinou.org) Received: from ducrot by poup.poupinou.org with local (Exim) id 1DAuw6-0005v4-00; Mon, 14 Mar 2005 20:09:06 +0100 Date: Mon, 14 Mar 2005 20:09:06 +0100 To: "Alexander S. Usov" Message-ID: <20050314190906.GK2298@poupinou.org> References: <20050311183150.T72922@carver.gumbysoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040907i From: Bruno Ducrot cc: freebsd-current@freebsd.org Subject: Re: Using cpufreq X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2005 19:09:20 -0000 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 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 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.