Can't recompile disassembled asl from acpidump with iasl

I've been looking into suspend/resume on the Framework Laptop 16, for which I wanted to experiment with overriding the ACPI aml. To that end, I dumped and disassembled the AML with acpidump:

sh:
gmc@medeski:~/src/acpi $ sudo acpidump -td > dsdt.asl
gmc@medeski:~/src/acpi $

Which gives me the disassembly. Now, before I change anything, I want to compile that back into machine code again with iasl, but this fails:

sh:
gmc@medeski:~/src/acpi $ iasl -p assembled dsdt.asl

Intel ACPI Component Architecture
ASL+ Optimizing Compiler/Disassembler version 20221020
Copyright (c) 2000 - 2022 Intel Corporation

Error    6126 -  Compiler aborting due to parser-detected syntax error(s)


dsdt.dsl  34263:             Name (M115, Buffer (0x05){})
Error    6126 -   syntax error ^

      ...

dsdt.dsl  51102:     Method (M277, 1, Serialized)
Warning  3115 -                ^ Not all control paths return a value (\M277)

Input file:    dsdt.dsl - Compilation aborted due to parser-detected syntax error(s)

Compilation failed. 44 Errors, 206 Warnings, 425 Remarks
No AML files were generated due to syntax error(s)
gmc@medeski:~/src/acpi $

Now, this is the first time I attempt anything like this, so I might be doing something stupid. Is it incorrect to expect the output of acpidump -d (which uses iasl -d under the hood if I'm not mistaken) to be able to be compiled by iasl again? If so, what would be the correct way to obtain the asl, patch the output and compile it back to machine code?
 
Back
Top