From owner-freebsd-acpi@FreeBSD.ORG Fri Oct 29 05:51:15 2010 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A6E71065673; Fri, 29 Oct 2010 05:51:15 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 822838FC1D; Fri, 29 Oct 2010 05:51:14 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id IAA28154; Fri, 29 Oct 2010 08:51:06 +0300 (EEST) (envelope-from avg@icyb.net.ua) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1PBhrm-000DlA-47; Fri, 29 Oct 2010 08:51:06 +0300 Message-ID: <4CCA60C9.7040600@icyb.net.ua> Date: Fri, 29 Oct 2010 08:51:05 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.11) Gecko/20101021 Lightning/1.0b2 Thunderbird/3.1.5 MIME-Version: 1.0 To: Lin Ming References: <201010121209.06397.hselasky@c2i.net> <1288278300.2459.19.camel@localhost> <1288279472.2459.22.camel@localhost> <201010281810.23668.hselasky@c2i.net> <1288312476.13315.15.camel@minggr.sh.intel.com> <4CCA594C.7050806@icyb.net.ua> <4CCA5A3B.9000101@icyb.net.ua> In-Reply-To: <4CCA5A3B.9000101@icyb.net.ua> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@FreeBSD.org, "Moore, Robert" , Jung-uk Kim Subject: Re: MacBookPro 5,1 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Oct 2010 05:51:15 -0000 on 29/10/2010 08:23 Andriy Gapon said the following: > on 29/10/2010 08:19 Andriy Gapon said the following: [snip] >> l_prs_template is populated in link_add_prs() function, which called to walk >> over resources returned by _PRS: >> http://fxr.watson.org/fxr/source/dev/acpica/acpi_pci_link.c#L499 >> http://fxr.watson.org/fxr/source/dev/acpica/acpi_pci_link.c#L269 >> http://fxr.watson.org/fxr/source/dev/acpica/acpi_pci_link.c#L324 >> >> So, it would seem that those incorrect lengths would come from evaluation of >> _PRS by ACPICA code. But that's probably a naive conclusion, it could be that >> we incorrectly manipulate a received resource. I guess that a general problem here is that it is incorrect to merely use memcpy/bcopy to create a copy of a resource if the resource has ACPI_RESOURCE_SOURCE field in it. Is there a helper function for making such a copy? -- Andriy Gapon