Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Oct 2010 19:57:59 -0400
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        freebsd-acpi@FreeBSD.org
Subject:   Re: MacBookPro 5,1
Message-ID:  <201010131958.02252.jkim@FreeBSD.org>
In-Reply-To: <201010121209.06397.hselasky@c2i.net>
References:  <201010121209.06397.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



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