From: Brown, Len <len.brown@in...> - 2005-07-27 16:09:33
>> Replace s64 with u64 and it at least compiles.
I published this initial version while at OLS,
having tested it only on ia32.
I tested it now on x86_64 and ran into the same problem as you.
The fix, however, is to use the typedef used in the kernel,
a signed long long, in this case.
After this change it works fine for me on x86_64 -- I'll
push a new version momentarily.
From: Brown, Len <len.brown@in...> - 2005-07-27 17:04:00
feel free to send me a patch to fix it.
>From: Voluspa [mailto:voluspa@...]=20
>Sent: Wednesday, July 27, 2005 9:45 AM
>To: Thomas Renninger
>Cc: Brown, Len; acpi-devel@...
>Subject: Re: [ACPI] Re: acpidump replaces acpidmp
>24 -r-------- 1 root root 24136 Jul 27 14:47 dsdt
>28 -rw-r--r-- 1 root root 24743 Jul 27 14:52 dsdt.acpidump
>OK, I now know that acpidump gives me both fadt and dsdt and something
>more, hence the difference. But this is usability madness; 1) The
>documentation of program switches, Both README and source,=20
>mildly accurate and inaccurate; 2) Having to dump/decode in several
>steps here (not really knowing if you've made an error) and then later
>in iasl as well.
>Compared to just copying dsdt from /proc and following all the=20
>online on how to modify it, this hackery is not sane.
Brown, Len wrote:
>>>Replace s64 with u64 and it at least compiles.
> I published this initial version while at OLS,
> having tested it only on ia32.
> I tested it now on x86_64 and ran into the same problem as you.
> The fix, however, is to use the typedef used in the kernel,
> a signed long long, in this case.
> After this change it works fine for me on x86_64 -- I'll
> push a new version momentarily.
Works with -O2 compile flag, it segfaults with -g.
The bad line is:
memcpy(&rsdt, tbl, tbl->length); (line 196)
The rsdt has an undefined amount of pointers to other ACPI
tables in the end, therefore tbl->length > sizeof(struct rsdt),
memcpy writes outside &rsdt.
Patch to avoid memcpy attached. Don't know how to integrate it nicer/shorter,