From owner-cvs-src@FreeBSD.ORG Tue Nov 30 17:53:41 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E0D316A4D1 for ; Tue, 30 Nov 2004 17:53:41 +0000 (GMT) Received: from mail1.speakeasy.net (mail1.speakeasy.net [216.254.0.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id D575143D48 for ; Tue, 30 Nov 2004 17:53:40 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 1593 invoked from network); 30 Nov 2004 17:53:40 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 30 Nov 2004 17:53:40 -0000 Received: from qa4379.itdev.weather.com (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id iAUHrJ0A088272; Tue, 30 Nov 2004 12:53:35 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Nate Lawson Date: Tue, 30 Nov 2004 12:53:26 -0500 User-Agent: KMail/1.6.2 References: <200411300655.iAU6th5L066950@repoman.freebsd.org> In-Reply-To: <200411300655.iAU6th5L066950@repoman.freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200411301253.26797.jhb@FreeBSD.org> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/acpica acpi_pci_link.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Nov 2004 17:53:41 -0000 On Tuesday 30 November 2004 01:55 am, Nate Lawson wrote: > njl 2004-11-30 06:55:43 UTC > > FreeBSD src repository > > Modified files: > sys/dev/acpica acpi_pci_link.c > Log: > Make sure the link array is big enough to hold both _CRS and _PRS > resource lists. It used to be sized based only on _CRS, hence _PRS could > perform an out-of-bounds access if it was larger (i.e., when there are > dependent functions). Add asserts to detect this case. Note, this is > only a temporary fix and I believe _PRS and _CRS should have separate > arrays. > > Also, fix a typo where the wrong irq was being check for the APIC case. > > Submitted by: tegge The real fix is not separate arrays per se but real dependent function support. We need a resource management concept of resource sets, so that each set of dependent resources with a dependent start/end pair are considered a set, and a driver can query 1) how many sets there are and 2) set the current set of resources. Trying to use more resources than are in _CRS is probably a bug and might break _SRS on these machines. Hmm, also, the code assumes when doing _SRS that the link indices are the resource indices, so you just broke _SRS for any link devices that have a non-IRQ resource. :( What I think we should do for now is to only include the first resource set as the current resources for an ACPI device that has multiple resource sets instead of just including all the resources. I'll try to work on this. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org