Opened 13 months ago

Last modified 13 months ago

#15196 new bug

Patch ACPI/DSDT on the fly and allow fixed DSDT.aml to be sideloaded

Reported by: probono Owned by: tqh
Priority: normal Milestone: Unscheduled
Component: Drivers/ACPI Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: x86-64

Description

Some machines suffer from severe performance degradation due to buggy ACPI.

Haiku Boot could

  • Patch ACPI/DSDT on the fly
  • Allow a manually created, fixed DSDT.aml to be sideloaded (for cases in which the automatic patching is not sufficient)

The Clover bootloader, for example, has this functionality:

  • SMBIOS will be corrected to standard 2.6
  • ACPI will be corrected to standard 4.0
  • Custom DSDT will be loaded from booted partition or from EFI folder
  • DSDT patching on the fly by fixes and by patterns
  • ACPI tables loading (SSDT-xx, APIC, BOOT, SLIC, SLIT, SRAT, UEFI...)

References

Attachments (1)

linux-acpi.zip (198.2 KB ) - added by probono 13 months ago.
ACPI tables of Acer Revo One RL85 dumped under Linux using acpidump

Download all attachments as: .zip

Change History (4)

comment:1 by tqh, 13 months ago

Thanks for the well written info. We have discussed this before and should probably not be that hard to do. I lack time to work on this so if anyone wants to take a stab at this go ahead.

ACPICA tries to handle buggy firmwares quite well these days so it would be interesting to know which hw needs this.

comment:2 by probono, 13 months ago

Acer Revo One RL85 is eating up lots of CPU when ACPI is enabled. I was hoping that some ACPI patching might solve this. Let me know if you need more information about the system.

Last edited 13 months ago by probono (previous) (diff)

by probono, 13 months ago

Attachment: linux-acpi.zip added

ACPI tables of Acer Revo One RL85 dumped under Linux using acpidump

comment:3 by probono, 13 months ago

Not sure what it all means, but this is what I get when trying to disassemble under Linux:

ubuntu@ubuntu:~/linux-acpi$ iasl -e dmar.dat fidt.dat msdm.dat ssdt4.dat ssdt8.dat apic.dat dsdt.dat fpdt.dat ssdt1.dat ssdt5.dat tpm2.dat 'asf!.dat' facp.dat hpet.dat ssdt2.dat ssdt6.dat uefi.dat csrt.dat facs.dat mcfg.dat ssdt3.dat ssdt7.dat -d dsdt.dat

Intel ACPI Component Architecture
ASL+ Optimizing Compiler version 20160108-32
Copyright (c) 2000 - 2016 Intel Corporation

Input file dsdt.dat, Length 0x1666E (91758) bytes
ACPI: DSDT 0x0000000000000000 01666E (v02 ACRSYS ACRPRDCT 01072009 INTL 20120913)
External object resolution file        ssdt7.dat
Input file ssdt7.dat, Length 0x5AA (1450) bytes
ACPI: SSDT 0x0000000000000000 0005AA (v02 PmRef  ApIst    00003000 INTL 20120913)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file        ssdt3.dat
Input file ssdt3.dat, Length 0x539 (1337) bytes
ACPI: SSDT 0x0000000000000000 000539 (v02 PmRef  Cpu0Ist  00003000 INTL 20120913)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file         mcfg.dat
Input file mcfg.dat, Length 0x3C (60) bytes
    mcfg.dat: Table [MCFG] is not an AML table - ignoring
External object resolution file         facs.dat
Input file facs.dat, Length 0x40 (64) bytes
ACPI Warning: Table header for [FACS] has invalid ASCII character(s) (20160108/acfileio-466)
    facs.dat: Table [FACS] is not an AML table - ignoring
External object resolution file         csrt.dat
Input file csrt.dat, Length 0xC4 (196) bytes
    csrt.dat: Table [CSRT] is not an AML table - ignoring
External object resolution file         uefi.dat
Input file uefi.dat, Length 0x42 (66) bytes
    uefi.dat: Table [UEFI] is not an AML table - ignoring
External object resolution file        ssdt6.dat
Input file ssdt6.dat, Length 0x3D3 (979) bytes
ACPI: SSDT 0x0000000000000000 0003D3 (v02 PmRef  Cpu0Cst  00003001 INTL 20120913)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file        ssdt2.dat
Input file ssdt2.dat, Length 0xC7D (3197) bytes
ACPI: SSDT 0x0000000000000000 000C7D (v02 Ther_R Ther_Rvp 00001000 INTL 20120913)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file         hpet.dat
Input file hpet.dat, Length 0x38 (56) bytes
    hpet.dat: Table [HPET] is not an AML table - ignoring
External object resolution file         facp.dat
Input file facp.dat, Length 0x10C (268) bytes
ACPI: FACP 0x0000000000000000 00010C (v05 ACRSYS ACRPRDCT 01072009 AMI  00010013)
Pass 1 parse of [FACP]
ACPI Warning: Invalid character(s) in name (0x00001850), repaired: [P***] (20160108/utstring-311)
ACPI Warning: Invalid character(s) in name (0x80000018), repaired: [****] (20160108/utstring-311)
ACPI Warning: Invalid character(s) in name (0x03E90065), repaired: [****] (20160108/utstring-311)
ACPI Warning: Invalid character(s) in name (0x00180402), repaired: [****] (20160108/utstring-311)
ACPI Warning: Invalid character(s) in name (0x00001850), repaired: [P***] (20160108/utstring-311)
ACPI Warning: Invalid character(s) in name (0x00000018), repaired: [****] (20160108/utstring-311)
Pass 2 parse of [FACP]
ACPI Error: Unknown opcode 0xEF at table offset 0x0025, ignoring (20160108/psobject-117)
/*
Error: Unknown opcode 0xEF at table offset 0x0025, context:
  0015: 44 43 54 09 20 07 01 41 4D 49 20 13 00 01 00 80  // DCT. ..AMI .....
  0025: EF CF 9B D0 A1 C1 9A 01 01 09 00 B2 00 00 00 A0  // ................
  0035: A1 00 00 00 18 00 00 00 00 00 00 04 18 00 00 00  // ................
 */
ACPI Error: Unknown opcode 0xCF at table offset 0x0026, ignoring (20160108/psobject-117)
/*
Error: Unknown opcode 0xCF at table offset 0x0026, context:
  0016: 43 54 09 20 07 01 41 4D 49 20 13 00 01 00 80 EF  // CT. ..AMI ......
  0026: CF 9B D0 A1 C1 9A 01 01 09 00 B2 00 00 00 A0 A1  // ................
  0036: 00 00 00 18 00 00 00 00 00 00 04 18 00 00 00 00  // ................
 */
ACPI Error: Unknown opcode 0x9B at table offset 0x0027, ignoring (20160108/psobject-117)
/*
Error: Unknown opcode 0x9B at table offset 0x0027, context:
  0017: 54 09 20 07 01 41 4D 49 20 13 00 01 00 80 EF CF  // T. ..AMI .......
  0027: 9B D0 A1 C1 9A 01 01 09 00 B2 00 00 00 A0 A1 00  // ................
  0037: 00 00 18 00 00 00 00 00 00 04 18 00 00 00 00 00  // ................
 */
ACPI Error: Unknown opcode 0xD0 at table offset 0x0028, ignoring (20160108/psobject-117)
/*
Error: Unknown opcode 0xD0 at table offset 0x0028, context:
  0018: 09 20 07 01 41 4D 49 20 13 00 01 00 80 EF CF 9B  // . ..AMI ........
  0028: D0 A1 C1 9A 01 01 09 00 B2 00 00 00 A0 A1 00 00  // ................
  0038: 00 18 00 00 00 00 00 00 04 18 00 00 00 00 00 00  // ................
 */
Segmentation fault (core dumped)

Segmentation fault (core dumped) is frightening me... but maybe I am just doing it wrong.

Note: See TracTickets for help on using tickets.