Problem fixing DSDT (parse error)
Hi all,
I've already fixed some other dsdt some month ago using DSDT-Howto from acpi.sf.net site. But now I need to fix this parse error:
dsdt.dsl.orig 3081: If (SS1)
Error 1037 - ^ parse error
This is the dsdt part (a block code before and one after If (SS1) ):
[...]
Scope (\_SB)
{
Scope (PCI0)
{
Name (CRS, ResourceTemplate ()
{
WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
0x0000,
0x0000,
0x00FF,
0x0000,
0x0100)
IO (Decode16, 0x0CF8, 0x0CF8, 0x01, 0x08)
WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
0x0000,
0x0000,
0x0CF7,
0x0000,
0x0CF8)
WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
0x0000,
0x0D00,
0xFFFF,
0x0000,
0xF300)
DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
0x00000000,
0x000A0000,
0x000BFFFF,
0x00000000,
0x00020000)
DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000)
DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000)
})
CreateDWordField (CRS, 0x5C, MIN5)
CreateDWordField (CRS, 0x60, MAX5)
CreateDWordField (CRS, 0x68, LEN5)
CreateDWordField (CRS, 0x76, MIN6)
CreateDWordField (CRS, 0x7A, MAX6)
CreateDWordField (CRS, 0x82, LEN6)
Method (_CRS, 0, NotSerialized)
{
Store (MG1B, MIN5)
Store (MG1L, LEN5)
Store (MG1L, Local0)
If (Local0)
{
Add (MIN5, Decrement (Local0), MAX5)
}
Store (MG2B, MIN6)
Store (MG2L, LEN6)
Store (MG2L, Local0)
Add (MIN6, Decrement (Local0), MAX6)
Return (CRS)
}
}
}
If (SS1)
{
Name (\_SB.PCI0._S1D, 0x02)
Name (\_SB.PCI0.P0P2._S1D, 0x02)
Name (\_SB.PCI0.USB1._S1D, 0x02)
Name (\_SB.PCI0.USB2._S1D, 0x02)
Name (\_SB.PCI0.USB3._S1D, 0x02)
}
If (SS3)
{
Name (\_SB.PCI0._S3D, 0x02)
Name (\_SB.PCI0.P0P2._S3D, 0x02)
Name (\_SB.PCI0.USB1._S3D, 0x02)
Name (\_SB.PCI0.USB2._S3D, 0x02)
Name (\_SB.PCI0.USB3._S3D, 0x02)
}[...]
Any ideas???
PS: If you want I need to post all code
_______________________________________
Connessione ed e-mail gratuita da 10 mb consultabile tramite web e tramite pop. www.infinito.it vieni a scoprire tutti i nostri servizi!
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
Quoted 3 lines · [email protected] wrote:
Hi all,
I've already fixed some other dsdt some month ago using DSDT-Howto from acpi.sf.net site. But now I need to fix this parse error:
As far as I know this is how it should look like, putting the IF statements into an _INI method (please correct me if I am wrong):
Scope (\_SB)
{
Method (_INI, 0, NotSerialized)
{
If (SS1)
{
Name (\_SB.PCI0._S1D, 0x02)
Name (\_SB.PCI0.P0P2._S1D, 0x02)
Name (\_SB.PCI0.USB1._S1D, 0x02)
Name (\_SB.PCI0.USB2._S1D, 0x02)
Name (\_SB.PCI0.USB3._S1D, 0x02)
}
If (SS3)
{
Name (\_SB.PCI0._S3D, 0x02)
Name (\_SB.PCI0.P0P2._S3D, 0x02)
Name (\_SB.PCI0.USB1._S3D, 0x02)
Name (\_SB.PCI0.USB2._S3D, 0x02)
Name (\_SB.PCI0.USB3._S3D, 0x02)
}
}
Scope (PCI0)
{
Name (CRS, ResourceTemplate ()
{
WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
0x0000,
0x0000,
0x00FF,
0x0000,
0x0100)
IO (Decode16, 0x0CF8, 0x0CF8, 0x01, 0x08)
WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
0x0000,
0x0000,
0x0CF7,
0x0000,
0x0CF8)
WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
0x0000,
0x0D00,
0xFFFF,
0x0000,
0xF300)
DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
0x00000000,
0x000A0000,
0x000BFFFF,
0x00000000,
0x00020000)
DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000)
DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000)
})
CreateDWordField (CRS, 0x5C, MIN5)
CreateDWordField (CRS, 0x60, MAX5)
CreateDWordField (CRS, 0x68, LEN5)
CreateDWordField (CRS, 0x76, MIN6)
CreateDWordField (CRS, 0x7A, MAX6)
CreateDWordField (CRS, 0x82, LEN6)
Method (_CRS, 0, NotSerialized)
{
Store (MG1B, MIN5)
Store (MG1L, LEN5)
Store (MG1L, Local0)
If (Local0)
{
Add (MIN5, Decrement (Local0), MAX5)
}
Store (MG2B, MIN6)
Store (MG2L, LEN6)
Store (MG2L, Local0)
Add (MIN6, Decrement (Local0), MAX6)
Return (CRS)
}
}
}-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
Ok, here it is.
It compiles, but I wouldn't trust this DSDT too much:
e.g.:
1)
If (Local0)
{
Return (0x1F)
Store (0x1F, P378)
}
Else
{
Return (0x0F)
Store (0x0F, P378)
}dsdt.dsl.orig 2468: Store (0x1F, P378)
Warning 2079 - Statement is unreachable ^
dsdt.dsl.orig 2473: Store (0x0F, P378)
Warning 2079 - Statement is unreachable
Of course the Store method is never reached (I switched the statements, don't know exactly what is stored, but it has something to do with the battery status ... (insertion/ejection _STA))
2)
Scope (\_SB) is defined about three times.
The compiler seems to accept this, but it's quite confusing.
I just put the IF statements that layed around in the _SB scope into the _INI method of _SB. That at leasts avoid the compiler errors and you could have a closer look to that what really matters to you.
3)
There is one warning, I don't know about. You can avoid it by compiling without optimzation (-oa):
dsdt.dsl.orig 2683: Scope (\_SB.PCI0)
Warning 2031 - Internal compiler error ^ (Not using optimized name - did not find node)
Thomas
P.S: Is it possible that you edited the file in windows, I had to delete the \r at the end of each line...