From owner-freebsd-current@FreeBSD.ORG Mon Jun 14 20:50:12 2004 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 377AB16A4CE for ; Mon, 14 Jun 2004 20:50:12 +0000 (GMT) Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7B5943D49 for ; Mon, 14 Jun 2004 20:50:09 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 6885 invoked from network); 14 Jun 2004 20:49:43 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 14 Jun 2004 20:49:42 -0000 Received: from 10.50.41.233 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i5EKndIU059107; Mon, 14 Jun 2004 16:49:39 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-current@FreeBSD.org Date: Mon, 14 Jun 2004 16:50:32 -0400 User-Agent: KMail/1.6 References: <20040613225307.8238716A4D4@hub.freebsd.org> <20040613220241.N17008@root.org> <20040614.091215.18218220.imp@bsdimp.com> In-Reply-To: <20040614.091215.18218220.imp@bsdimp.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200406141650.32570.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: current@FreeBSD.org cc: "M. Warner Losh" cc: nate@root.org Subject: Re: cvs commit: src/sys/dev/acpica acpi.c acpi_acad.c acpi_button.c acpi_cmbat.c acpi_ec.c acpi_isab.c acpi_lid.c acpi_pcib_acpi.c acpi_resource.c acpivar.h 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 Jun 2004 20:50:12 -0000 On Monday 14 June 2004 11:12 am, M. Warner Losh wrote: > In message: <20040613220241.N17008@root.org> > > Nate Lawson writes: > : On Sun, 13 Jun 2004, Nate Lawson wrote: > : > Modified files: > : > sys/dev/acpica acpi.c acpi_acad.c acpi_button.c > : > acpi_cmbat.c acpi_ec.c acpi_isab.c > : > acpi_lid.c acpi_pcib_acpi.c > : > acpi_resource.c acpivar.h > : > Log: > : > Add support to ACPI to manage its own resources. Previously, > : > resource allocation was passed up to nexus. Now, we probe sysresource > : > objects and manage the resources they describe in a local rman pool. > : > This helps devices which attach/detach varying resources (like the _CST > : > object) and module loads/unloads. The allocation/release routines now > : > check to see if the resource is described in a child sysresource object > : > and if so, allocate from the local rman. Sysresource objects add their > : > resources to the pool and reserve them upon boot. This means > : > sysresources need to be probed before other ACPI devices. > : > > : > Changes include: > : > * Add ordering to the child device probe. The current order is: > : > system resource objects, embedded controllers, then everything else. * > : > Make acpi_MatchHid take a handle instead of a device_t arg. * Replace > : > acpi_{get,set}_resource with the generic equivalents. > : > > : > Revision Changes Path > : > 1.159 +137 -52 src/sys/dev/acpica/acpi.c > : > 1.27 +1 -1 src/sys/dev/acpica/acpi_acad.c > : > 1.27 +6 -4 src/sys/dev/acpica/acpi_button.c > : > 1.30 +2 -2 src/sys/dev/acpica/acpi_cmbat.c > : > 1.52 +1 -1 src/sys/dev/acpica/acpi_ec.c > : > 1.8 +3 -1 src/sys/dev/acpica/acpi_isab.c > : > 1.23 +1 -1 src/sys/dev/acpica/acpi_lid.c > : > 1.35 +1 -1 src/sys/dev/acpica/acpi_pcib_acpi.c > : > 1.25 +91 -37 src/sys/dev/acpica/acpi_resource.c > : > 1.71 +3 -1 src/sys/dev/acpica/acpivar.h > : > : This has been tested for a little while but may cause some problems. On > : my laptop, all devices work as before but I get this new output: > : > : unknown: can't assign resources (memory) > : unknown: can't assign resources (port) > : unknown: can't assign resources (port) > : unknown: can't assign resources (memory) > : unknown: can't assign resources (memory) > : unknown: can't assign resources (irq) > : unknown: can't assign resources (port) > : unknown: can't assign resources (port) > : unknown: can't assign resources (port) > : > : These messages are wrong since the associated devices have already gotten > : their resources. For instance, IBM3780 (psm0) has successfully gotten > : irq 12 so PnP ISA shouldn't be trying to probe it. Here devinfo -r shows > : that it's fine: > : > : psm0 > : Interrupt request lines: > : 0xc > : > : Perhaps someone more knowledgable with the isa code can help figure this > : out. > > I'll take a look as soon as I upgrade my laptop past these changes. This is the possible suspect: jhb 2004-06-10 20:43:04 UTC FreeBSD src repository Modified files: sys/i386/acpica acpi_machdep.c sys/i386/i386 bios.c sys/i386/include/pc bios.h Log: - Use the correct devclass name ("acpi" vs "ACPI") to detect if acpi0 is present and thus that the PnPBIOS probe should be skipped instead of having ACPI zero out the PnPBIOStable pointer. - Make the PnPBIOStable pointer static to i386/i386/bios.c now that that is the only place it is used. Revision Changes Path 1.21 +0 -6 src/sys/i386/acpica/acpi_machdep.c 1.67 +3 -2 src/sys/i386/i386/bios.c 1.17 +0 -1 src/sys/i386/include/pc/bios.h Note that it worked fine in my tests. The devices you see are PnPBIOS devices so it seems the PnPBIOS device isn't properly bailing before adding new devices. I'd try to make sure the code in bios.c does see the acpi0 device and return. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org