From: Armin Wolf <W_Armin@gmx.de>
To: "Billie Alsup (balsup)" <balsup@cisco.com>
Cc: "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
Len Brown <lenb@kernel.org>
Subject: Re: 32-bit versus 64-bit ACPI tables
Date: Sun, 5 May 2024 18:25:08 +0200 [thread overview]
Message-ID: <2cd5a3d5-ed29-48c7-bb70-e660aff5c0d2@gmx.de> (raw)
In-Reply-To: <SJ0PR11MB662464447DF707057BF43F97D9192@SJ0PR11MB6624.namprd11.prod.outlook.com>
Am 01.01.70 um 01:00 schrieb :
> My hardware comes with a DSDT with 32-bit tables, however I would like to add a
> 64-bit table via SSDT. Although, my SSDT compiles and loads successfully, the
> kernel truncates my 64-bit values because it apparently remembers that the DSDT
> used 32-bit tables. Is there a way to have a 64-bit SSDT, to augment a 32-bit DSDT?
>
> I don't quite understand the reason for truncating the SSDT values. The original
> code (from 2005!) warns that this is potentially a serious problem in the ACPI
> table(s) due to (possibly) buggy ASL compilers. However, in my case, I want
> to explicitly have a 64-bit SSDT, and set the ComplianceRevision to 2 specifically
> to support 64-bit integers. But alas, they are still truncated due to a global
> setting of
>
> acpi_gbl_integer_bit_width = 32;
> acpi_gbl_integer_nybble_width = 8;
> acpi_gbl_integer_byte_width = 4;
>
> versus having table specific settings. Is there a workaround for this issue?
>
> It would be quite painful (both for me, and for customers) to get new firmware
> with a higher ComplianceRevision in the DSDT. I wonder if there is an acceptable
> alternative. For example, is truncation really required still (are we still dealing with
> buggy ASL compilers after 19 more years have elapsed?). Should there be a
> kernel command line parameter, or a kernel config option, to disable truncation?
> Should these acpi_gbl_integer_* variables be table specific, rather than global?
>
> I would appreciate any insights or advice you can offer me. Thanks in advance!
>
> Some additional references:
>
> 1. truncation occurs in file drivers/acpi/acpica/exutils.c
> function acpi_ex_truncate_for32bit_table
> 2. initial setting of the globals occurs in file drivers/acpi/utilities/utmisc.c
> function acpi_ut_set_integer_width
Hi,
the ACPI specification says that the integer length for _both_ DSDT and SSDT tables
is controlled by the revision field of the DSDT, so your 32-bit DSDT prevents your
SSDT from using 64-bit integers.
The only solution for this would be to not use 64-bit values inside your SSDT, is
there a reason why you absolutely need 64-bit integers in your DSDT?
Thanks,
Armin Wolf
next prev parent reply other threads:[~2024-05-05 16:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-01 17:05 32-bit versus 64-bit ACPI tables Billie Alsup (balsup)
2024-05-05 16:25 ` Armin Wolf [this message]
2024-05-06 11:04 ` Rafael J. Wysocki
2024-05-06 17:15 ` Billie Alsup (balsup)
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=2cd5a3d5-ed29-48c7-bb70-e660aff5c0d2@gmx.de \
--to=w_armin@gmx.de \
--cc=balsup@cisco.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.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