Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Nov 2004 12:53:26 -0500
From:      John Baldwin <jhb@FreeBSD.org>
To:        Nate Lawson <njl@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/dev/acpica acpi_pci_link.c
Message-ID:  <200411301253.26797.jhb@FreeBSD.org>
In-Reply-To: <200411300655.iAU6th5L066950@repoman.freebsd.org>
References:  <200411300655.iAU6th5L066950@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411301253.26797.jhb>