Le grande dsdt error central

И этим все сказано.

Access width of Field Unit extends beyond region limit

SRST, 1,
Error 1051 - ^ Access width of Field Unit extends beyond region limit
ACPW, 1
Error 1051 - ^ Access width of Field Unit extends beyond region limit

This error consists on that the limit of data is less that the quantity of the same

OperationRegion (GPIO, SystemIO, 0x1180, 0x3B)   <---------- "0x3B" contains the error, it must be increased for example to "0x3C"  (hexa)

Field (GPIO, WordAcc, Lock, Preserve)
{
AccessAs (DWordAcc, 0x00),
Offset (0x0F),
, 4,
LV28, 1,
Offset (0x2D),
, 5,
LPOL, 1,
Offset (0x38),
, 1,
SRST, 1,
Offset (0x39),
, 2,
ACPW, 1
}

We can use a decimal - hexadecimal converter to try new values until we find the correct one that the compiler likes

Argument count mismatch error

./dsdt_fixed.txt     1: ACPI (Local2)
Error    4095 -            ^ syntax error, unexpected PARSEOP_NAMESEG, expecting PARSEOP_DEFINITIONBLOCK

This error comes from line 1

If we look inside the DSDT.dsl, we can verify that the error is here:

ACPI Error (dmutils-0261): Argument count mismatch for method \_SB_.VWAK 3 1 [20080926]
ACPI Error (dmutils-0261): Argument count mismatch for method \_GPE.VBRE 2 1 [20080926]
/*
 * Intel ACPI Component Architecture
 * AML Disassembler version 20080926

There should be no code after these lines:

/*
 * Intel ACPI Component Architecture
 * AML Disassembler version 20080926

By simply erasing those two lines, you should be able to try and compile again, and see if it generates a new error.

Called method returns no value ^
This error shows itself like this: (may appear different)

Store (GAHS (0x00), Local6)  Error    4061 -    Called method returns no value ^

You have to look for the Method itself, you will find it´s a empty method:

Method (GAHS, 1, NotSerialized)
{
}

Just add a retun to it and the compiler will feel happy.

Method (GAHS, 1, NotSerialized)
{
    Return (0x01)
}

Internal compiler error ^ (null Op pointer)

dsdt.dsl 4106: If (LNot (\_OSI ("Windows 2006")))
Error 4011 - Internal compiler error ^ (null Op pointer)

The incorrect part of the code is:

If (LNot (\_OSI ("Windows 2006")))
{
PHSR (0x10, 0x00)
}

It can be fixed by these changes:

If (\_OSI ("Windows 2006"))
   {
      }
    Else
      {
      PHSR (0x10, 0x00)
   }

local variable is not initialized

./dsdt_fixed.txt 408: Store (Local0, Local0)
Error 4050 - ^ Method local variable is not initialized (Local0)

If we revise the code, and look at line 408 we find the following error:

Scope (\_SI)
    {
    Method (_MSG, 1, NotSerialized)
    {
        Store (Local0, Local0)
    }
    Method (_SST, 1, NotSerialized)
    {
        Store (Local0, Local0)
    }
    }

How do we know what in the DSDT.dsl needs fixing? If you search for “Store” in the menu, and look just below the error, you will see something like this:

Store (0xFF, RSR0)
Store (0x80, PMC0)

The first value of “Store” is a hexadecimal value, and the second, a variable. There is the error. In the code (Local0,local0), it is supposed that the first value is a hexadecimal, not a variable. we could add 0x00 or also zero, in a format like this:

Scope (\_SI)
    {
    Method (_MSG, 1, NotSerialized)
    {
        Store (zero, Local0)
    }
    Method (_SST, 1, NotSerialized)
    {
        Store (zero, Local0)
    }
    }

Here we have the fix for gigabytes that have a similar problem:

Scope (\_SI)
    {
    Method (_MSG, 1, NotSerialized)
    {
        Store ("Local0", Local0)
    }
    Method (_SST, 1, NotSerialized)
    {
        Store ("Local0", Local0)
    }
    }

Note that Gigabyte puts Local0 in the quotes to fix the error. Then we should have initialized everything that the compiler asks us.

Maximum error count (200) exceeded

./dsdt_fixed.txt    24:     External (^CPU0._PPC)

The problem here is that the compiler doesn’t like the following:

External (^CPU0._PPC)

It can be fixed by using this code:

External (\_PR.CPU0._PPC)

Then we must find and replace every occurrence in the code that has ^CPU0 for _PR.CPU0 to skip this error:

dsdt.dsl.patched   574:                     If (LGreater (^CPU0._PPC, Zero))
Error    4063 -      Object not found or not accessible from scope ^  (^CPU0._PPC)

dsdt.dsl.patched   576:                         Subtract (^CPU0._PPC, One, ^CPU0._PPC)
Error    4063 -      Object not found or not accessible from scope ^  (^CPU0._PPC)

dsdt.dsl.patched   576:                         Subtract (^CPU0._PPC, One, ^CPU0._PPC)
Error    4063 -                       Object not found or not accessible from scope ^  (^CPU0._PPC)

dsdt.dsl.patched   578:                         Add (^CPU0._PPC, One, ^CPU0._PPC)
Error    4063 - Object not found or not accessible from scope ^  (^CPU0._PPC)

Method local variable is not initialized

dsdt.dsl   610:      If (LNot (LEqual (ShiftRight (And (Local1, 0x10), 0x03), And (Local2, 0x02))))
Error    1013 -      Method local variable is not initialized ^  (Local1)

In this case, you must change all “Local1” in that line to “Local2” (Only in this case, in others it could be another error.)

Method local variable is not initialized (Local0)

DSDT.dsl 242: Store (Local0, Local0)
Error 4050 – ^ Method local variable is not initialized (Local0)

This error is produced because a variable tries to store it’s value in itself.

Original:

  Scope (\_SI)
  {
   Method (_MSG, 1, NotSerialized)
   {
    Store (Local0, Local0)
   }

   Method (_SST, 1, NotSerialized)
   {
    Store (Local0, Local0)
    If (LEqual (Arg0, 0x03)) {}
    If (LEqual (Arg0, 0x01)) {}
   }
  }

Repaired:

   Scope (\_SI)
   {
    Method (_MSG, 1, NotSerialized)
    {
 /* Store (Local0, Local0) */      /* <------------ you need to comment this out or enclose on "" the first LOCAL0.*/
    }

    Method (_SST, 1, NotSerialized)
    {
 /* Store (Local0, Local0) */       /* <------------ you need to comment this out or enclose on "" the first LOCAL0..*/
    If (LEqual (Arg0, 0x03)) {}
    If (LEqual (Arg0, 0x01)) {}
    }
   }

Local0 enclosed with “” :

 Scope (\_SI)
  {
   Method (_MSG, 1, NotSerialized)
   {
/* Store ("Local0", Local0) */      /* <------------ you need to comment this out or enclose on "" the first LOCAL0.*/
   }

   Method (_SST, 1, NotSerialized)
   {
/* Store ("Local0", Local0) */       /* <------------ you need to comment this out or enclose on "" the first LOCAL0..*/
   If (LEqual (Arg0, 0x03)) {}
   If (LEqual (Arg0, 0x01)) {}
   }
  }

Missing ResourceSource string

dsdt.asl  1028:                     0x0100, 0x00)
Error    1094 -                      ^ Missing ResourceSource string (required)

dsdt.asl  1034:                     0x00000CF8, 0x00)
Error    1094 -                     ^ Missing ResourceSource string (required)

dsdt.asl  1041:                     0x0000F300, 0x00)
Error    1094 -                     ^ Missing ResourceSource string (required)

To fix this error we must eliminate the value of 0x00 from all erroneous entries:

Before:

1023  WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
1024      0x0000, /* Address Space Granularity */
1025      0x0000, /* Address Range Minimum */
1026      0x00FF, /* Address Range Maximum */
1027      0x0000, /* Address Translation Offset */
1028      0x0100, 0x00)

After:

1023  WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
1024      0x0000, /* Address Space Granularity */
1025      0x0000, /* Address Range Minimum */
1026      0x00FF, /* Address Range Maximum */
1027      0x0000, /* Address Translation Offset */
1028      0x0100)

Search for all the lines and repair

must return a value (_WAK)

dsdt.dsl   163:     Method (_WAK, 1, NotSerialized)
Warning  2026 -                ^ Reserved method must return a value (_WAK)

At the end of the _WAK method, this must be added:

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

Example:

Method (_WAK, 1, NotSerialized)
    {
    P8XH (One, 0xAB)
    If (LOr (LEqual (Arg0, 0x03), LEqual (Arg0, 0x04)))
    {
        If (And (CFGD, 0x01000000))
        {
            If (LAnd (And (CFGD, 0xF0), LEqual (OSYS, 0x07D1)))
            {
                TRAP (0x3D)
            }
        }
    }

    If (LEqual (RP2D, Zero))
    {
        Notify (\_SB.PCI0.RP02, Zero)
    }

    If (LEqual (Arg0, 0x03)) {}
    If (LEqual (Arg0, 0x04))
    {
        \_SB.PCI0.LPCB.EC.SELE ()
    }

    P8XH (Zero, 0xCD)

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

Not all control paths return a value

dsdt.dsl   255:             Method (_BTP, 1, NotSerialized)
Warning  2019 -              ^ Not all control paths return a value (_BTP)

Source

Device (CMB0)
{
    Name (_HID, EisaId ("PNP0C0A"))
    Name (_UID, 0x01)
    Name (BATP, Ones)
    Name (_PCL, Package (0x01)
    {
    \_SB
    })
    ...
    ...
    ...
    Method (_BTP, 1, NotSerialized)
    {
    If (LEqual (\ECFL, Zero))
    {
        Return (0x0F)
    }
    Else
    {
        Store ("_SB.CMB0._BTP", Debug)
    }
    }
    ...
    ...
    ...
}

In this case, the solution consists on using the returned value of \ECFL and then add it in place of “Debug”

Change this line:

 Store ("_SB.CMB0._BTP", Debug)

to this:

 Store ("_SB.CMB0._BTP", 0x0F)

Not all control paths return a value

dsdt.dsl  7288:             Method (EVNT, 1, NotSerialized)
Warning  1086 -                        ^ Not all control paths return a value (EVNT)

In this other case, a value of this kind must be returned at the end of the method:

Return (Zero)

Example:

Method (EVNT, 1, NotSerialized)
        {
            While (VZOK)
            {
                If (LEqual (VZOK, 0x01))
                {
                    Store (Arg0, VZOK)
                    Notify (\_SB.VALZ, 0x80)
                    Return (Zero)
                }
                Else
                {
                    Sleep (0x05)
                }
            }
       }

The fix is something like:

Method (EVNT, 1, NotSerialized)
        {
            While (VZOK)
            {
                If (LEqual (VZOK, 0x01))
                {
                    Store (Arg0, VZOK)
                    Notify (\_SB.VALZ, 0x80)
                    Return (Zero)
                }
                Else
                {
                    Sleep (0x05)
                }
            }
                Return (Zero)
       }

Object does not exist ^ (\LOR)

./dsdt_fixed.txt 233: If (\LOr (_OSI ("Darwin"), _OSI ("Windows 2001")))
Error 4063 - Object does not exist ^ (\LOR)

Solution:

If (LOr (\_OSI ("Darwin"), \_OSI ("Windows 2001")))

or

If (LOr (_OSI ("Darwin"), _OSI ("Windows 2001")))

Object does not exist ^ (_PR.C000)

In this error, there is missing code that needs to be added to the beginning.

dsdt.dsl    75:              If (LEqual (\C001, 0x00))
Error    1061 -       Object does not exist ^  (\C001)

dsdt.dsl  6589:                 \_PR.C000
Error    1061 -   Object does not exist ^  (\_PR.C000)

dsdt.dsl  6645:         Notify (\_PR.C000, 0x80)
Error    1061 -   Object does not exist ^  (\_PR.C000)

dsdt.dsl  6718:         Notify (\_PR.C000, 0x80)
Error    1061 -   Object does not exist ^  (\_PR.C000)

This is the code to be added:

External (\C001)
External (\_PR.C000)

Just below the header of the DSDT, like this:

/*
 * Intel ACPI Component Architecture
 * AML Disassembler version 20090625
 *
 * Disassembly of ./dsdt.dat, Tue Aug 11 23:29:06 2009
 *
 *
 * Original Table Header:
 *     Signature        "DSDT"
 *     Length           0x00005FC3 (24515)
 *     Revision         0x02
 *     Checksum         0x13
 *     OEM ID           "Sony"
 *     OEM Table ID     "VAIO"
 *     OEM Revision     0x20080725 (537397029)
 *     Compiler ID      "INTL"
 *     Compiler Version 0x20090625 (537462309)
 */
DefinitionBlock ("./dsdt.aml", "DSDT", 2, "Sony", "VAIO", 0x20080725)
{

    External (\C001)
    External (\_PR.C000)


    External (L0C3)
    External (L1C3)
    External (PDC1)
    External (PDC0)
    External (CFGD)

Operation Region requires ByteAcc

./dsdt_fixed.txt  3964:      Field (ECRM, AnyAcc, Lock, Preserve)
Error    4075 -              ^ Host Operation Region requires ByteAcc access

./dsdt_fixed.txt  4192:      Return (Local1)
Error    4050 -     Method local variable is not initialized ^  (Local1)

What is happening here? Well This:

OperationRegion (ECRM, EmbeddedControl, Zero, 0xFF)
                Field (ECRM, AnyAcc, Lock, Preserve)

The compiler tells us that Anyacc isn’t correct, it must be ByteAcc, so that way we change this:

OperationRegion (ECRM, EmbeddedControl, Zero, 0xFF)
                Field (ECRM, ByteAcc, Lock, Preserve)

The second error:

./dsdt_fixed.txt  4192:      Return (Local1)
Error    4050 -     Method local variable is not initialized ^  (Local1)

Is similar to the error above, of the uninitialized variable, does it sound familiar to you all?

Method (PKTW, 1, NotSerialized)
                {
                    Store (Arg0, EPKT)
                    Return (Local1)

We fix it like this:

Method (PKTW, 1, NotSerialized)
                {
                    Store (Arg0, EPKT)
                    Return (Zero)

Possible operator timeout is ignored

dsdt.dsl  4220:             Acquire (MUTE, 0x03E8)
Warning  1103 -              ^ Possible operator timeout is ignored

dsdt.dsl  4234:             Acquire (MUTE, 0x03E8)
Warning  1103 -              ^ Possible operator timeout is ignored

dsdt.dsl  4249:             Acquire (MUTE, 0x03E8)
Warning  1103 -              ^ Possible operator timeout is ignored

dsdt.dsl  4264:             Acquire (MUTE, 0x0FFF)
Warning  1103 -              ^ Possible operator timeout is ignored

dsdt.dsl  4278:             Acquire (MUTE, 0x03E8)
Warning  1103 -               ^ Possible operator timeout is ignored

dsdt.dsl  4293:             Acquire (MUTE, 0x03E8)
Warning  1103 -               ^ Possible operator timeout is ignored

dsdt.dsl  4308:             Acquire (MUTE, 0x03E8)
Warning  1103 -               ^ Possible operator timeout is ignored

In this error, the value of MUTE must be changed from 0xXXXX to 0xFFFF

Acquire (MUTE, 0x03E8)

Converts to:

Acquire (MUTE, 0xFFFF)

it must be replaced where ever it gives error.

Reserved method has too few arguments

dsdt.dsl  3067:     Method (_EJ0, 0, NotSerialized)
Warning  1076 -     ^ Reserved method has too few arguments (_EJ0 requires 1)

This error is solved by changing:

Method (_EJ0, 0, NotSerialized)

to:

Method (_EJ0, 1, NotSerialized)

Reserved method has too many arguments

dsdt.dsl 906: Method (_OSC, 5, NotSerialized)
Warning 1075 - ^ Reserved method has too many arguments (_OSC requires 4)

Example:

Method (_OSC, 5, NotSerialized)
        {
            Store (Arg3, Local0)
            Multiply (Local0, 0x04, Local1)
            Name (BUF1, Buffer (Local1) {})
            Store (Arg4, BUF1)
            Store (Zero, Local1)
            Store (Zero, Local2)
            While (Local0)
            {
                Multiply (Local1, 0x04, Local2)
                CreateDWordField (BUF1, Local2, CAPB)
                If (Arg2)
                {
                    If (LEqual (Local1, Zero))
                    {
                        And (CAPB, 0xFFFFFFFC)
                    }
                }
                Else
                {
                }

                Increment (Local1)
                Decrement (Local0)
            }

            Return (BUF1)
        }

In this error you must change this:

Method (_OSC, 5, NotSerialized)

to this:

Method (_OSC, 4, NotSerialized)

Reserved method must return a value (_PSR)

dsdt.dsl 3896: Method (_PSR, 0, NotSerialized)
Warning 1079 - ^ Reserved method must return a value (_PSR)

Here the problem is that it is not detected the change from battery/AC

Extracted from the ACPI specifications:

11.3.1 PSR (Power Source)

Returns the current power source devices. Used for the AC adapter and is located under the AC adapter

object in name space. Used to determine if system is running off the AC adapter.

Arguments:

None

Result Code:

0x00000000 – Off-line

0x00000001 – On-line

This is the erroneous code:

Method (_PSR, 0, NotSerialized)
        {
            If (\_SB.PCI0.PIB.EC.ECOK)
            {
                Return (\_SB.PCI0.PIB.EC.ADP)
            }
        }

And here the solution:

Method (_PSR, 0, NotSerialized)
{
    If (\_SB.PCI0.PIB.EC.ECOK)
    {
    Return (0x01)
    }
    Else
    {
    Return (0x00)
    }
}

Reserved method must return a value (_STA)

This is the error:

                             Method (_STA, 0, NotSerialized)
Warning  2026 -                ^ Reserved method must return a value
(_STA)

This is the original code:

Method (_STA, 0, NotSerialized)
        {
            STAL (0x60)
        }

It should read:

        Method (_STA, 0, NotSerialized)
        {
            Return (STAL (0x60))
        }

Result is not used, operator has no effect

The warning:

./dsdt.dsl  2803:       And (CTRL, 0x1E)
Warning  1105 -         ^ Result is not used, operator has no effect

It can be fixed changing:

And (CTRL, 0x1E)

to:

And (CTRL, 0x1E, CTRL)

Result is not used, operator has no effect ^

dsdt.dsl 10150:                                         ShiftRight (BUF2, 0x04)
Warning  1105 -             Result is not used, operator has no effect ^

The error is produced because “Shiftright” stores no value:

.....
   Store (AAXB, MBUF)
   ShiftRight (BUF2, 0x04) <------- error.
   Store (BUF2, Local3)
   Store (CMER, BUF0)
   Store (0xFF, BUF1)
   Store (Zero, BUF2)
.....

it must be changed to this :

    Store (BUF2, Local4)
    Store (AAXB, MBUF)
    Store (BUF2, Local4)   <-----------  Here.
    Store (BUF2, Local3)
    Store (CMER, BUF0)
    Store (0xFF, BUF1)
    Store (Zero, BUF2)

String must be entirely alphanumeric

dsdt.dsl    32:             Name (_HID, "*PNP0A03")
Error    1068 -     ^ String must be entirely alphanumeric (*PNP0A03)

Solution:

Remove the “*” character

(*PNP0A03)

Converts to:

(PNP0A03)

too many arguments

dsdt.dsl  2672:        Method (_GLK, 1, NotSerialized)
Warning  2024 -       ^ Reserved method has too many arguments ( _GLK requires 0)

Solution: eliminate the arguments:

Method (_GLK)

this was a simple one :)

Warning 1099 -Unknown reserved name ^ (_BCG)

On this case the compiler is complaining about the use of “-” on a specified method name.

Example:

Method (_BCG, 0, Serialized)
                {
                    Store (C136, Local0)
                    Return (Local0)
                }
            }

Just change _BCG to BCG and the compiler will be happy again.

Method (BCG, 0, Serialized)
                {
                    Store (C136, Local0)
                    Return (Local0)
                }
            }

Use of reserved word ^ (_T_0)

In this error:

dsdt.dsl  2928:                             Name (_T_0, Zero)
Error    4081 -                 Use of reserved word ^  (_T_0)

dsdt.dsl  2980:                                                         Name (_T_1, "")
Error    4081 -                                             Use of reserved word ^  (_T_1)

dsdt.dsl  3012:                             Name (_T_2, Zero)
Error    4081 -                 Use of reserved word ^  (_T_2)

dsdt.dsl  3039:                         Name (_T_0, Zero)
Error    4081 -             Use of reserved word ^  (_T_0)

dsdt.dsl  3215:                             Name (_T_0, Zero)
Error    4081 -                 Use of reserved word ^  (_T_0)

dsdt.dsl  3404:                             Name (_T_1, Zero)
Error    4081 -                 Use of reserved word ^  (_T_1)

The solution consists of changing this:

Name (_T_0, Zero)

to this:

Name (T_0, Zero)

That’s all, folks!

Comments