Moore, Robert wrote: > I'll take a stab at it. > > As far as the ReturnType in an External, this is for compile-time static > checking only, just like an ordinary external declaration. > > Just a guess here: Are you having problems disassembling (then compiling) a > secondary table that has references back to the DSDT? If so, I can help with > that. The problem we have here is with a BIOS that contains a _CST object in a table that is Load()ed from an _OSC method.
When the _CST object is evaluated, ACPI CA finds the _CST object,
but no object is returned. _CST is defined to always return a Package().
The implementation of _CST is contained in a SystemMemory OpRegion,
Load()ed from an _OSC method, and is:
External (YCST, MethodObj) // 0 Arguments
[...]
Method (_CST, 0, NotSerialized)
{
If (LNot (And (PDC0, 0x10)))
{
Return (Package (0x02)
{
0x01,
Package (0x04)
{
ResourceTemplate ()
{
Register (FFixedHW,
0x00, // Bit Width
0x00, // Bit Offset
0x0000000000000000, // Address
,)
},
0x01,
0x9D,
0x03E8
}
})
}
YCST ()
}
YCST() is contained in the DSDT; first, a simplified version of it:
Method (YCST, 0, NotSerialized)
{
And (\_SB.MEM.CFGD, 0x70, Local0)
If (LEqual (Local0, 0x00))
{
Return (Package (0x02)
{
...
})
}
If (LEqual (Local0, 0x10))
{
Return (Package (0x03)
{
...
})
}
If (LEqual (Local0, 0x20))
{
Return (Package (0x03)
{
...
})
}
If (LEqual (Local0, 0x40))
{
Return (Package (0x03)
{
...
})
}
If (LEqual (Local0, 0x30))
{
Return (Package (0x04)
{
...
})
}
If (LEqual (Local0, 0x50))
{
Return (Package (0x04)
{
...
})
}
If (LEqual (Local0, 0x60))
{
Return (Package (0x04)
{
...
})
}
If (LEqual (Local0, 0x70))
{
Return (Package (0x05)
{
...
})
}
}
Note that every possible value of Local0 appears to be tested
for, and there is a Return (Package ()) in each case. It does
not appear possible that YCST() can return nothing.
It's confusing me. I'm suspecting something odd with the linkage
between the dynamically Load()ed _CST and the DSDT.
Cheers,
Dana
Complete DSL of YCST is below:
Method (YCST, 0, NotSerialized)
{
And (\_SB.MEM.CFGD, 0x70, Local0)
If (LEqual (Local0, 0x00))
{
Return (Package (0x02)
{
0x01,
Package (0x04)
{
ResourceTemplate ()
{
Register (FFixedHW,
0x00, // Bit Width
0x00, // Bit Offset
0x0000000000000000, // Address
,)
},
0x01,
0x01,
0x03E8
}
})
}
If (LEqual (Local0, 0x10))
{
Return (Package (0x03)
{
0x02,
Package (0x04)
{
ResourceTemplate ()
{
Register (FFixedHW,
0x00, // Bit Width
0x00, // Bit Offset
0x0000000000000000, // Address
,)
},
0x01,
0x01,
0x03E8
},
Package (0x04)
{
ResourceTemplate ()
{
Register (SystemIO,
0x08, // Bit Width
0x00, // Bit Offset
0x000000000000D814, // Address
,)
},
0x02,
0x01,
0x01F4
}
})
}
If (LEqual (Local0, 0x20))
{
Return (Package (0x03)
{
0x02,
Package (0x04)
{
ResourceTemplate ()
{
Register (FFixedHW,
0x00, // Bit Width
0x00, // Bit Offset
0x0000000000000000, // Address
,)
},
0x01,
0x01,
0x03E8
},
Package (0x04)
{
ResourceTemplate ()
{
Register (SystemIO,
0x08, // Bit Width
0x00, // Bit Offset
0x000000000000D815, // Address
,)
},
0x03,
0x11,
0xFA
}
})
}
If (LEqual (Local0, 0x40))
{
Return (Package (0x03)
{
0x02,
Package (0x04)
{
ResourceTemplate ()
{
Register (FFixedHW,
0x00, // Bit Width
0x00, // Bit Offset
0x0000000000000000, // Address
,)
},
0x01,
0x01,
0x03E8
},
Package (0x04)
{
ResourceTemplate ()
{
Register (SystemIO,
0x08, // Bit Width
0x00, // Bit Offset
0x000000000000D816, // Address
,)
},
0x03,
0x39,
0x64
}
})
}
If (LEqual (Local0, 0x30))
{
Return (Package (0x04)
{
0x03,
Package (0x04)
{
ResourceTemplate ()
{
Register (FFixedHW,
0x00, // Bit Width
0x00, // Bit Offset
0x0000000000000000, // Address
,)
},
0x01,
0x01,
0x03E8
},
Package (0x04)
{
ResourceTemplate ()
{
Register (SystemIO,
0x08, // Bit Width
0x00, // Bit Offset
0x000000000000D814, // Address
,)
},
0x02,
0x01,
0x01F4
},
Package (0x04)
{
ResourceTemplate ()
{
Register (SystemIO,
0x08, // Bit Width
0x00, // Bit Offset
0x000000000000D815, // Address
,)
},
0x03,
0x11,
0xFA
}
})
}
If (LEqual (Local0, 0x50))
{
Return (Package (0x04)
{
0x03,
Package (0x04)
{
ResourceTemplate ()
{
Register (FFixedHW,
0x00, // Bit Width
0x00, // Bit Offset
0x0000000000000000, // Address
,)
},
0x01,
0x01,
0x03E8
},
Package (0x04)
{
ResourceTemplate ()
{
Register (SystemIO,
0x08, // Bit Width
0x00, // Bit Offset
0x000000000000D814, // Address
,)
},
0x02,
0x01,
0x01F4
},
Package (0x04)
{
ResourceTemplate ()
{
Register (SystemIO,
0x08, // Bit Width
0x00, // Bit Offset
0x000000000000D816, // Address
,)
},
0x03,
0x39,
0x64
}
})
}
If (LEqual (Local0, 0x60))
{
Return (Package (0x04)
{
0x03,
Package (0x04)
{
ResourceTemplate ()
{
Register (FFixedHW,
0x00, // Bit Width
0x00, // Bit Offset
0x0000000000000000, // Address
,)
},
0x01,
0x01,
0x03E8
},
Package (0x04)
{
ResourceTemplate ()
{
Register (SystemIO,
0x08, // Bit Width
0x00, // Bit Offset
0x000000000000D815, // Address
,)
},
0x03,
0x11,
0xFA
},
Package (0x04)
{
ResourceTemplate ()
{
Register (SystemIO,
0x08, // Bit Width
0x00, // Bit Offset
0x000000000000D816, // Address
,)
},
0x03,
0x39,
0x64
}
})
}
If (LEqual (Local0, 0x70))
{
Return (Package (0x05)
{
0x04,
Package (0x04)
{
ResourceTemplate ()
{
Register (FFixedHW,
0x00, // Bit Width
0x00, // Bit Offset
0x0000000000000000, // Address
,)
},
0x01,
0x01,
0x03E8
},
Package (0x04)
{
ResourceTemplate ()
{
Register (SystemIO,
0x08, // Bit Width
0x00, // Bit Offset
0x000000000000D814, // Address
,)
},
0x02,
0x01,
0x01F4
},
Package (0x04)
{
ResourceTemplate ()
{
Register (SystemIO,
0x08, // Bit Width
0x00, // Bit Offset
0x000000000000D815, // Address
,)
},
0x03,
0x11,
0xFA
},
Package (0x04)
{
ResourceTemplate ()
{
Register (SystemIO,
0x08, // Bit Width
0x00, // Bit Offset
0x000000000000D816, // Address
,)
},
0x03,
0x39,
0x64
}
})
}
}
>
>> -----Original Message-----
>> From: Dana.Myers at Sun.COM [mailto:Dana.Myers at Sun.COM]
>> Sent: Thursday, March 19, 2009 12:49 PM
>> To: Li, Aubrey
>> Cc: Bill.Holler at Sun.COM; Liu, Jiang; tesla-dev at opensolaris.org; Moore,
>> Robert
>> Subject: Re: [tesla-dev] [Fwd: Lu from b105 - b110, panic on reboot]
>>
>> Li, Aubrey wrote:
>>> ACPICA do need more work here before we make sure it's really a BIOS
>> issue.
>>> Now it appears to be not.
>>>
>>>
>> So, I have a hunch what the problem may be.
>> cs0.dsl (one o the Load()ed tables that contains a _CST object)
>> contains:
>>
>> External (YCST, MethodObj)
>>
>> which I believe is truncated; reading section 17.5.42 of the ACPI 3.0a
>> spec (not the
>> latest rev, but it hasn't changed), we see that "MethodObj" is an object
>> type;
>> when MethodObj is present, the spec seems to imply that at least one
>> ReturnType
>> must follow.
>>
>> There's no ReturnType specified, so I'm guessing that ACPI CA doesn't
>> expect a
>> return from YCST and ignores the returned value.
>>
>> I've CC'ed Bob Moore at Intel for his opinion. Bob - I've included darn
>> near no
>> information here, but I think it may be sufficient :-) Does the above
>> description
>> sound familiar?
>>
>> Cheers,
>> Dana
>
