From owner-freebsd-acpi@FreeBSD.ORG Wed Oct 13 23:58:10 2010 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 4BC7F1065670; Wed, 13 Oct 2010 23:58:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-acpi@FreeBSD.org Date: Wed, 13 Oct 2010 19:57:59 -0400 User-Agent: KMail/1.6.2 References: <201010121209.06397.hselasky@c2i.net> In-Reply-To: <201010121209.06397.hselasky@c2i.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201010131958.02252.jkim@FreeBSD.org> Cc: 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: Wed, 13 Oct 2010 23:58:10 -0000 On Tuesday 12 October 2010 06:09 am, Hans Petter Selasky wrote: > Hi, > > My MacBookPro 5,1 does not boot using -current because memory > inside the ACPI kernel module is used after free. > > The following patch temporily mitigates the problem: > > /usr/src/sys/dev/acpica/Osd/OsdMemory.c > > void > AcpiOsFree(void *Memory) > { > + if (cold == 0) > free(Memory, M_ACPICA); > } > > Is there any way to debug this from user-land? acpidb(8). However, it is quite broken ATM. :-( Alternatively, you may use acpiexec from ACPICA: fetch http://www.acpica.org/download/acpica-unix-20101013.tar.gz tar xpf acpica-unix-20101013.tar.gz cd acpica-unix-20101013/tools/acpiexec gmake ./acpiexec Actually you need to extract ACPI tables from your BIOS (or UEFI in your case) to use with acpiexec. acpidump(8) gives you what you want BUT you cannot use it with acpiexec directly. You need to dump/extract tables using Linux pmtools: fetch http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/utils/pmtools-20100825.tar.bz2 fetch http://people.freebsd.org/~jkim/pmtools-20100825.diff tar xpf pmtools-20100825.tar.bz2 cd pmtools patch < ../pmtools-20100825.diff gmake sudo acpidump/acpidump -o ACPI.dat acpixtract/acpixtract -a ACPI.dat Note the pmtools patch is really a hack but it should work. ;-) Good luck, Jung-uk Kim * PS: If anyone has enough free time, please fix acpidb.