From owner-freebsd-hackers Wed Oct 23 13:20:18 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E6CD637B401 for ; Wed, 23 Oct 2002 13:20:16 -0700 (PDT) Received: from mail.speakeasy.net (mail14.speakeasy.net [216.254.0.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1E8C43E6E for ; Wed, 23 Oct 2002 13:20:15 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 24232 invoked from network); 23 Oct 2002 20:20:16 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail14.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 23 Oct 2002 20:20:16 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.6/8.12.6) with ESMTP id g9NKKDn5068228 for ; Wed, 23 Oct 2002 16:20:14 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Wed, 23 Oct 2002 16:20:17 -0400 (EDT) From: John Baldwin To: hackers@FreeBSD.org Subject: Getting ACPI to work on -stable Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Ok, here are the instructions on getting ACPI going on 4-stable for those of you who are foolish^H^H^H^H^H^H^Hbrave: - First, check out a -stable kernel source tree. - Second, check out current versions of the following parts of the kernel source tree (cvs co -r1 will do this): - src/sys/contrib/dev/acpica - src/sys/dev/acpica - src/sys/i386/acpica - src/sys/i386/include/acpica_machdep.h - src/sys/i386/isa/pmtimer.c - src/sys/kern/subr_power.c - src/sys/sys/power.h - Third, download and apply the patch at http://www.FreeBSD.org/~jhb/~patches/acpi_4x.patch. - Fourth, add 'device acpica' and 'device pmtimer' to a kernel config and compile a new kernel. Things known to work: - soft power-off with power button - ACPI timecounter - acpi tools in src/usr.sbin/acpi will compile ok on stable w/o modification if you perform enough magic to get it work, mostly consists of putting the checked out tree in the right place relative to a kernel source tree with the ACPI stuff in it and copying src/sys/i386/include/acpica_machdep.h to /usr/include/machine before building. You will also need to create a /dev/acpi device. ACPI's major number is 192, so you can hack MAKEDEV to add an entry for acpi identical to the apm entry except to s/apm/acpi/ and use 192 for the major. Thinks that might work: - suspend/resume? (doesn't do actually suspend on my one test machine here, but I'm not sure this motherboard really wants to suspend) - CPU throttling (haven't tested it) - I haven't tested the updated apm(4) code (it does compile) which is bascially a MFC so that it will work with subr_power.c and pmtimer(4). - ??? Things that definitely won't work: - PCI interrupt routing, using ACPI to enumerate host-PCI bridges It's not turned on so PCI still works, the system just isn't able to make use of ACPI when configuring PCI devices. I would like to MFC more of the stuff in acpi_4x.patch prior to 4.8. If people could test apm with these patches (don't put acpica in your kernel to use apm, but do put pmtimer in) I would appreciate it. Enjoy. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message