From owner-freebsd-acpi@FreeBSD.ORG Mon Oct 18 00:29:32 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 808AF1065673 for ; Mon, 18 Oct 2010 00:29:32 +0000 (UTC) (envelope-from robert.moore@intel.com) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx1.freebsd.org (Postfix) with ESMTP id 61E8D8FC13 for ; Mon, 18 Oct 2010 00:29:32 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 17 Oct 2010 17:01:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.57,343,1283756400"; d="scan'208";a="848050656" Received: from orsmsx603.amr.corp.intel.com ([10.22.226.49]) by fmsmga001.fm.intel.com with ESMTP; 17 Oct 2010 17:01:11 -0700 Received: from orsmsx503.amr.corp.intel.com ([10.22.226.47]) by orsmsx603.amr.corp.intel.com ([10.22.226.49]) with mapi; Sun, 17 Oct 2010 17:01:11 -0700 From: "Moore, Robert" To: Hans Petter Selasky , "freebsd-acpi@freebsd.org" Date: Sun, 17 Oct 2010 17:01:09 -0700 Thread-Topic: MacBookPro 5,1 Thread-Index: ActuAb5Oko93zI/bTsmvuRKC9IvoMwAVbxCw Message-ID: <4911F71203A09E4D9981D27F9D830858BBFA3B2F@orsmsx503.amr.corp.intel.com> References: <201010121209.06397.hselasky@c2i.net> <201010131958.02252.jkim@FreeBSD.org> <201010171056.12606.hselasky@c2i.net> <201010171547.56445.hselasky@c2i.net> In-Reply-To: <201010171547.56445.hselasky@c2i.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "Lin, Ming M" 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: Mon, 18 Oct 2010 00:29:32 -0000 Can you send us the acpidump for the machine? Also, tell us which control method is failing. Thanks >-----Original Message----- >From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- >acpi@freebsd.org] On Behalf Of Hans Petter Selasky >Sent: Sunday, October 17, 2010 6:48 AM >To: freebsd-acpi@freebsd.org >Cc: linux-acpi@vger.kernel.org >Subject: Re: MacBookPro 5,1 > >Hi, > >CC'ing the Linux guys, hence I belive you are using the same ACPI code lik= e >in >FreeBSD. > >It appears that when a string is present in the extended interrupt >descriptor >(6.4.3.6, ACPIspec30.pdf), then this is not handled correctly, meaning tha= t >the precomputed buffer space when encoding to AML, is incorrect and that >data >is written beyond the destination buffer! > >The error is catched on a MacBookPro 5,1 and is visible if you zero-pad al= l >ACPI allocations to 4096 bytes, and verify that the freed buffer is not >written beyond the allocation. Also the Extended interrupt descriptor must >be >the last element encoded in the AML. > >The quick patch is to disable these elements. I tried to figure out why >this >happens, but this particular handling in the code looks very obfuscated to >me. > >src/sys/contrib/dev/acpica >%svk diff >=3D=3D=3D resources/rsmisc.c >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >--- resources/rsmisc.c (revision 213698) >+++ resources/rsmisc.c (local) >@@ -311,6 +311,8 @@ > > > case ACPI_RSC_SOURCEX: >+ break; /* RSC_SOURCEX is broken */ >+ > /* > * Optional ResourceSource (Index and String). This is the >more > * complicated case used by the Interrupt() macro >@@ -537,6 +539,8 @@ > > > case ACPI_RSC_SOURCEX: >+ break; /* RSC_SOURCEX is broken */ >+ > /* > * Optional ResourceSource (Index and String) > */ > > >Any comments are welcome! > >--HPS > >Please keep me CC'ed. >_______________________________________________ >freebsd-acpi@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-acpi >To unsubscribe, send any mail to "freebsd-acpi-unsubscribe@freebsd.org"