* Re: MacBookPro 5,1
[not found] ` <201010171056.12606.hselasky@c2i.net>
@ 2010-10-17 13:47 ` Hans Petter Selasky
0 siblings, 0 replies; only message in thread
From: Hans Petter Selasky @ 2010-10-17 13:47 UTC (permalink / raw)
To: freebsd-acpi; +Cc: Jung-uk Kim, linux-acpi
Hi,
CC'ing the Linux guys, hence I belive you are using the same ACPI code like 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 that
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 all
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
=== resources/rsmisc.c
==================================================================
--- 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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-10-17 13:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <201010121209.06397.hselasky@c2i.net>
[not found] ` <201010131958.02252.jkim@FreeBSD.org>
[not found] ` <201010171056.12606.hselasky@c2i.net>
2010-10-17 13:47 ` MacBookPro 5,1 Hans Petter Selasky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox