DSDT files



With the command dmesg |grep MSFT you get the output:

ACPI: DSDT (v001 INTEL GRANTSDL 0x06040000 MSFT 0x0100000e) @ 0x00000000



This means the DSDT table is compiled with a Windows compiler. This compiler is in no way strict against errors. However the Linux version as well as Linux itself are not forgiving.

I have downloaded the IASL compiler from Intel ©

After installing the compiler I did the following:


become root and make a dsdt.dat file

>cat /proc/acpi/dsdt > /root/dsdt.dat

decompile the dsdt.dat file

>./iasl -d /root/dsdt.dat

recompile the dsdt.dat file

>./iasl -tc dsdt.dsl

This produced errors and warnings as shown below


Compiler Output 1

Intel ACPI Component Architecture

ASL Optimizing Compiler / AML Disassembler version 20040220 [Oct 2 2004]

Copyright (C) 2000 - 2004 Intel Corporation

Supports ACPI Specification Revision 2.0c



dsdt.dsl 325: Method (SLLB, 1, NotSerialized)

Warning 2019 - ^ Not all control paths return a value (SLLB)



dsdt.dsl 339: Method (PBGU, 1, NotSerialized)

Warning 2019 - ^ Not all control paths return a value (PBGU)



dsdt.dsl 2091: Field (ERAM, AnyAcc, Lock, Preserve)

Error 1048 - ^ Host Operation Region requires ByteAcc access



dsdt.dsl 3406: Field (IDE1, DWordAcc, NoLock, Preserve)

Error 1047 - ^ Access width is greater than region size



dsdt.dsl 3408: MAP, 8,

Error 1051 - ^ Access width of Field Unit extends beyond region limit



dsdt.dsl 3410: PCS, 8

Error 1051 - ^ Access width of Field Unit extends beyond region limit



dsdt.dsl 4317: Method (_WAK, 1, NotSerialized)

Warning 2026 - ^ Reserved method must return a value (_WAK)



ASL Input: dsdt.dsl - 4483 lines, 160417 bytes, 2326 keywords

Compilation complete. 4 Errors, 3 Warnings, 0 Remarks, 453 Optimizations


So I have 4 Errors and 3 Warnings. Error 1 requires a different variable declaration. Error 2,3,4 can be solved by increasing one value. See web references mentioned above for detailed information. Warnings are given because certain functions do not return a value under certain conditions. This is solved by adding a return value at the end of the functions.



Next step is to remove the errors and warnings.



BEFORE

AFTER

OperationRegion (ERAM, EmbeddedControl, 0x00, 0xFF)

Field (ERAM, AnyAcc, Lock, Preserve)

{

.....

}

OperationRegion (ERAM, EmbeddedControl, 0x00, 0xFF)

Field (ERAM, ByteAcc, Lock, Preserve)

{

.....

}

dsdt.dsl 3406: Field (IDE1, DWordAcc, NoLock, Preserve)

Error 1047 - ^ Access width is greater than region size



dsdt.dsl 3408: MAP, 8,

Error 1051 - ^ Access width of Field Unit extends beyond region limit



dsdt.dsl 3410: PCS, 8

Error 1051 - ^ Access width of Field Unit extends beyond region limit


dsdt.dsl 2091: Field (ERAM, AnyAcc, Lock, Preserve)

Error 1048 - ^ Host Operation Region requires ByteAcc access

BEFORE

AFTER

Device (IDE1)

{

Name (_ADR, 0x001F0002)

OperationRegion (IDE1, PCI_Config, 0x90, 0x03)

Field (IDE1, DWordAcc, NoLock, Preserve)

{

MAP, 8,

Offset (0x02),

PCS, 8

}

Device (IDE1)

{

Name (_ADR, 0x001F0002)

OperationRegion (IDE1, PCI_Config, 0x90, 0x04)

Field (IDE1, DWordAcc, NoLock, Preserve)

{

MAP, 8,

Offset (0x02),

PCS, 8

}


dsdt.dsl 325: Method (SLLB, 1, NotSerialized)

Warning 2019 - ^ Not all control paths return a value (SLLB)

BEFORE

AFTER

Method (SLLB, 1, NotSerialized)

{

Store (Arg0, Local0)

And (Local0, 0xFF, Local0)

If (LLess (Arg0, 0x0100))

{

Return (Z002)

}

Else

{

Store (Local0, Z002)

}

}

Method (SLLB, 1, NotSerialized)

{

Store (Arg0, Local0)

And (Local0, 0xFF, Local0)

If (LLess (Arg0, 0x0100))

{

Return (Z002)

}

Else

{

Store (Local0, Z002)

}

Return(Package(0x02){0x00, 0x00})

}

dsdt.dsl 339: Method (PBGU, 1, NotSerialized)

Warning 2019 - ^ Not all control paths return a value (PBGU)

BEFORE

AFTER

Method (PBGU, 1, NotSerialized)

{

If (LEqual (Arg0, 0x00))

{}

If (LEqual (Arg0, 0x01))

{

Return (Z003)

}



If (LEqual (Arg0, 0x02))

{

Store (0x00, Z003)

Return (Z003)

}

}

Method (PBGU, 1, NotSerialized)

{

If (LEqual (Arg0, 0x00))

{}

If (LEqual (Arg0, 0x01))

{

Return (Z003)

}



If (LEqual (Arg0, 0x02))

{

Store (0x00, Z003)

Return (Z003)

}

Return(Package(0x02){0x00, 0x00})

}

dsdt.dsl 4317: Method (_WAK, 1, NotSerialized)

Warning 2026 - ^ Reserved method must return a value (_WAK)

BEFORE

AFTER

Method (_WAK, 1, NotSerialized)

{

Store (0x02, \_SB.PCI0.LPC0.GP13)

If (LEqual (Arg0, 0x04))

{

\_SB.OSHT ()

\_SB.PCI0.LPC0.PHSS (0x10)

\_SB.PCI0.LPC0.PHSS (0x0F)

}



Store (0x00, DEBG)

If (LEqual (OSYS, 0x07CE))

{

Notify (\_SB.PCI0.PWRB, 0x02)

}

}

Method (_WAK, 1, NotSerialized)

{

Store (0x02, \_SB.PCI0.LPC0.GP13)

If (LEqual (Arg0, 0x04))

{

\_SB.OSHT ()

\_SB.PCI0.LPC0.PHSS (0x10)

\_SB.PCI0.LPC0.PHSS (0x0F)

}



Store (0x00, DEBG)

If (LEqual (OSYS, 0x07CE))

{

Notify (\_SB.PCI0.PWRB, 0x02)

}

Return(Package(0x02){0x00, 0x00})

}


This done, a new compilation showed the following.


ws06:~/acpica-unix-20050309/compiler # iasl -tc dsdt.dsl



Intel ACPI Component Architecture

ASL Optimizing Compiler / AML Disassembler version 20040220 [Oct 2 2004]

Copyright (C) 2000 - 2004 Intel Corporation

Supports ACPI Specification Revision 2.0c



ASL Input: dsdt.dsl - 4494 lines, 160714 bytes, 2329 keywords

AML Output: DSDT.aml - 19051 bytes 612 named objects 1717 executable opcodes



Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 456 Optimizations


So we now have a good DSDT file. The compiler produced 2 files.

DSDT.aml and DSDT.hex

Under Suse 9.2 we will use DSDT.aml.

Create a folder dsdt under /etc/acpi/

Copy the DSDT.aml to the folder /etc/acpi/dsdt


Open Yast.

Select System

Select /etc/sysconfig editor

Locate “system”,“kernel”,”ACPI_DST”

Enter the location of the DSDT.aml file, e.g. /etc/acpi/dsdt/DSDT.aml

Become root and enter

>mk_initrd

The output should show you that a DSDT file is found.


Under Yast, Bootloader section remove the NOLAPIC section.

Because the DSDT file only checks for Microsoft products, Linux will not be recognised. Therefore add the following text:

acpi_os=”Microsoft Windows XP”


I will add a Linux section in a futurse DSDT release.

Install the wireless lan card as described in method 3



Return