Date: Sun, 02 Jan 2005 20:08:22 -0800 From: Nate Lawson <nate@root.org> To: acpi@freebsd.org Cc: acpi-devel@lists.sourceforge.net Subject: Bug in "implicit return" code Message-ID: <41D8C536.8020301@root.org>
next in thread | raw e-mail | index | archive | help
I have identified a problem in the implicit return code in dsutils.c. Various Toshiba laptops have a _STA method that is similar to this: DefinitionBlock ("DSDT.aml", "DSDT", 1, "TOSHIB", "8100 ", 536872468) { Device (LNKA) { Name (_HID, EisaId ("PNP0C0F")) Method (_STA, 0, NotSerialized) { STAL (0x60) } } Method (STAL, 1, NotSerialized) { /* Various link accesses removed for clarity. */ Return (0x0B) } } If you compile and run this snippet in the debugger, you'll see that _STA doesn't return anything even with EnableInterpreterSlack set to TRUE. This means the implicit return code doesn't work properly. I examined the AcpiDsIsResultUsed() function and found that the check that was failing was this one: /* * If there is no parent, we are executing at the method level. * An executing method typically has no parent, since each method * is parsed separately. */ if (!Op->Common.Parent) So it appears that there _is_ a parent and the implicit return code below is never executed for this method. I'm not sure the proper way to change this check for the above AML case but hopefully the Intel people will know. -- Nate
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41D8C536.8020301>