From owner-acpi-jp@jp.FreeBSD.org Thu Sep 19 04:34:28 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g8IJYSq37920;
	Thu, 19 Sep 2002 04:34:28 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from mail.speakeasy.net (mail12.speakeasy.net [216.254.0.212])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id g8IJYR337841
	for <acpi-jp@jp.FreeBSD.org>; Thu, 19 Sep 2002 04:34:27 +0900 (JST)
	(envelope-from jhb@FreeBSD.org)
Received: (qmail 6373 invoked from network); 18 Sep 2002 19:34:19 -0000
Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender <jhb@FreeBSD.org>)
          by mail12.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP
          for <msmith@FreeBSD.org>; 18 Sep 2002 19:34:19 -0000
Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1])
	by server.baldwin.cx (8.12.5/8.12.5) with ESMTP id g8IJXeBv062779;
	Wed, 18 Sep 2002 15:33:49 -0400 (EDT)
	(envelope-from jhb@FreeBSD.org)
Message-ID: <XFMail.20020918153341.jhb@FreeBSD.org>
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
From: John Baldwin <jhb@freebsd.org>
To: acpi-jp@jp.FreeBSD.org
Cc: msmith@freebsd.org
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Wed, 18 Sep 2002 15:33:41 -0400
X-Sequence: acpi-jp 1836
Subject: [acpi-jp 1836] Got ACPI working on 4.x
Errors-To: owner-acpi-jp@jp.FreeBSD.org
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: jhb@FreeBSD.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+020902

Hey all,

I finally tracked down my problem with my backport of ACPI to 4.x.
ACPI uses bus_set_resource() to grab IRQ 9 so it can register its
interrupt handler.  However, stable does not have support for
bus_set_resource() in the nexus driver, so the bus_set_resource()
silently just gave ACPI IRQ 0 instead.  Thus, when the clk device
tried to attach to irq0, it failed.  Since the clock code is kind
of lame it does not check for errors though. :)  This is why I had
no irq0 clock interrupts.  Backporting the bits of the nexus
driver to support bus_set_resource() and friends from current to
stable fixed my problem.  I now have all of ACPI aside from the
PCI bridge and PCI bus drivers working on 4.x.  I plan to commit
the MFC's to supporting code after 4.7 including:

 - subr_power and converting apm to use subr_power interface
 - nexus bus_set_resource() and friends
 - resource_list_print_type()
 - pmtimer driver

Once that is done I would like to add in a few #ifdef's to the
ACPI code in current so that it will work on -stable as well.
This would make it easier for people who want to use ACPI on 4.x
to make it work.  If anyone is interested in the patches I am
using I can make them available.

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
