From owner-freebsd-acpi@FreeBSD.ORG Thu Oct 21 07:15:37 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 7F35D106564A for ; Thu, 21 Oct 2010 07:15:37 +0000 (UTC) (envelope-from ming.m.lin@intel.com) Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by mx1.freebsd.org (Postfix) with ESMTP id 569868FC15 for ; Thu, 21 Oct 2010 07:15:37 +0000 (UTC) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 21 Oct 2010 00:15:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.58,216,1286175600"; d="scan'208";a="338674840" Received: from minggr.sh.intel.com (HELO [10.239.13.26]) ([10.239.13.26]) by azsmga001.ch.intel.com with ESMTP; 21 Oct 2010 00:15:31 -0700 From: Lin Ming To: Hans Petter Selasky In-Reply-To: <1287632360.6530.3103.camel@minggr.sh.intel.com> References: <201010121209.06397.hselasky@c2i.net> <201010200834.28444.hselasky@c2i.net> <1287556591.6530.3071.camel@minggr.sh.intel.com> <201010201006.41112.hselasky@c2i.net> <1287632360.6530.3103.camel@minggr.sh.intel.com> Content-Type: text/plain; charset="UTF-8" Date: Thu, 21 Oct 2010 15:12:27 +0800 Message-ID: <1287645147.6530.3107.camel@minggr.sh.intel.com> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 7bit Cc: "freebsd-acpi@freebsd.org" , "Moore, Robert" 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: Thu, 21 Oct 2010 07:15:37 -0000 On Thu, 2010-10-21 at 11:39 +0800, Lin Ming wrote: > On Wed, 2010-10-20 at 16:06 +0800, Hans Petter Selasky wrote: > > On Wednesday 20 October 2010 08:36:31 Lin Ming wrote: > > > On Wed, 2010-10-20 at 14:34 +0800, Hans Petter Selasky wrote: > > > > On Tuesday 19 October 2010 07:47:02 Lin Ming wrote: > > > > > On Tue, 2010-10-19 at 04:21 +0800, Hans Petter Selasky wrote: > > > > > > On Monday 18 October 2010 02:01:09 Moore, Robert wrote: > > > > > > > Can you send us the acpidump for the machine? > > > > > > > > > > > > > > Also, tell us which control method is failing. > > > > > > > > > > > > > > Thanks > > > > > > > > > > > > Hi, > > > > > > > > > > > > Please find attached dump of ACPI tables. > > > > > > > > > > > > It is the function AcpiRsCreateAmlResources() which writes beyond the > > > > > > buffer it allocates. > > > > > > > > > > Could you enable AML debug output to get more info? > > > > > But I don't know how to enable it on FreeBSD. > > > > > > > > > > In Linux, the AML debug output is enabled with kernel boot parameters > > > > > like below. > > > > > acpi.debug_layer=0xffffffff acpi.debug_level=0xffffffff > > > > > > > > > > FreeBSD may have some similar boot parameters. > > > > > > > > I've enabled the debug prints just around the failing function. Here is > > > > the > > > > > > > result: > > > What's the kernel parameters are you using? > > > There should be a lot of AML debug output. > > > > > > Hi, > > > > During the function call that overwrites it's buffer, there are no more debug > > prints than shown in the code, even with all debug prints on. Where should I > > add more debug prints? > > I'm trying to reproduce this bug in the acpi simulator(acpiexec). > Will get back to you. Hi, Could you apply below debug patch and attach the output? I'll try to reproduce this bug with the output. It will print something like below, Passed in resource buffer length=136 Buffer start f 0 0 0 44 0 0 0 1 0 0 0 1 0 1 0 45 ee 44 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Buffer end Thanks. diff --git a/source/components/resources/rsxface.c b/source/components/resources/rsxface.c index 2a019d1..459ad44 100644 --- a/source/components/resources/rsxface.c +++ b/source/components/resources/rsxface.c @@ -394,6 +394,7 @@ AcpiSetCurrentResources ( { ACPI_STATUS Status; ACPI_NAMESPACE_NODE *Node; + UINT8 i, *Buffer; ACPI_FUNCTION_TRACE (AcpiSetCurrentResources); @@ -416,6 +417,15 @@ AcpiSetCurrentResources ( return_ACPI_STATUS (Status); } + AcpiOsPrintf("Passed in resource buffer length=%d\n", InBuffer->Length); + AcpiOsPrintf("Buffer start\n"); + Buffer = (UINT8*) InBuffer->Pointer; + for (i = 0; i < (UINT8) InBuffer->Length; i++) + { + AcpiOsPrintf("%x ", Buffer[i]); + } + AcpiOsPrintf("\nBuffer end\n"); + Status = AcpiRsSetSrsMethodData (Node, InBuffer); return_ACPI_STATUS (Status); }