From: Greg Alexander <gre-VobwYXd2LmVM656bX5wj8A@public.gmane.org>
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: IASL bug with big constants?
Date: Sat, 2 Oct 2004 12:12:32 -0500 [thread overview]
Message-ID: <20041002171232.GA11585@goonies.be> (raw)
Hi -
I hope this hasn't already been addressed. I skimmed the logs and the
buggy version appears to still be on Intel's site...
I see the trouble in constants in OperationRegions generally getting
cut to one-byte. i.e.:
---
DefinitionBlock ("DSDT.aml", "DSDT", 1, "VIA", "VIA_K7", 4096)
{
....
OperationRegion (M4D0, SystemMemory, 0x04D0, 0x0B)
Field (M4D0, ByteAcc, NoLock, Preserve)
{
....
}
}
---
when I assembled then disassembled that with the 20040715 version of
iasl, I got:
---
DefinitionBlock ("DSDT.aml", "DSDT", 1, "VIA", "VIA_K7", 4096)
{
....
OperationRegion (M4D0, SystemMemory, 0xD0, 0x0B) /* should be 0x04D0 */
Field (M4D0, ByteAcc, NoLock, Preserve)
{
....
}
}
---
Note the 0xD0 where 0x04D0 is expected! My laptop manufacturer put
NVRAM at 0x4D0. They did not put it at 0xD0.
I tracked it down to the following code in
acpica/compiler/aslopcodes.c line 209 in OpcSetOptimalIntegerSize(),
at the very beginning:
---
if (Op->Asl.Parent &&
Op->Asl.Parent->Asl.Parent &&
(Op->Asl.Parent->Asl.Parent->Asl.ParseOpcode == PARSEOP_DEFINITIONBLOCK))
{
return 0;
}
---
The parent is the OperationRegion, the parent's parent is the
DefinitionBlock, so it doesn't generate a size for the opcode.
So it gets the default from aslmap.c line 520:
/* INTEGER */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, ACPI_BTYPE_INTEGER),
It defaults to a byte! I looked in the changelog and I suspect this
corresponds to the following entry:
Eliminated optimization messages for "_T_x" objects and small
constants within the DefinitionBlock operator.
Why don't you want to optimize small constants within the
DefinitionBlock operator? Why only when it's nested? Why not test a
change at least once before sending it to customers? Since the
change is both broken and meaningless to me, I simply removed the
offending piece of code and now OpcSetOptimalIntegerSize() does its
job appropriately and my DSDT works. If we really don't want to
optimize them, perhaps we should set a better default, like
AML_DWORD_OP?
This is a MOST frustrating bug to track down -- I had so little faith
in my BIOS vendor that I thought they had enough non-standard crap
jammed in there that recompiling my DSDT was expected to fail.
Sure takes the joy out of bashing the Microsoft compiler.
Nonetheless, thanks for the tools. I never could have fixed my laptop
without iasl.
Cheers,
- Greg
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
next reply other threads:[~2004-10-02 17:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-02 17:12 Greg Alexander [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-10-06 17:47 IASL bug with big constants? Moore, Robert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041002171232.GA11585@goonies.be \
--to=gre-vobwyxd2lmvm656bx5wj8a@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox