public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* 32-bit versus 64-bit ACPI tables
@ 2024-05-01 17:05 Billie Alsup (balsup)
  2024-05-05 16:25 ` Armin Wolf
  0 siblings, 1 reply; 4+ messages in thread
From: Billie Alsup (balsup) @ 2024-05-01 17:05 UTC (permalink / raw)
  To: linux-acpi@vger.kernel.org, lenb@kernel.org; +Cc: Billie Alsup (balsup)

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-05-06 17:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-01 17:05 32-bit versus 64-bit ACPI tables Billie Alsup (balsup)
2024-05-05 16:25 ` Armin Wolf
2024-05-06 11:04   ` Rafael J. Wysocki
2024-05-06 17:15   ` Billie Alsup (balsup)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox