On Fri, Dec 07, 2012 at 10:26:48AM -0500, Gabriel L. Somlo wrote:
On Fri, Dec 07, 2012 at 10:24:58AM +0100, Gerd Hoffmann wrote:
On 12/06/12 21:56, Kevin O'Connor wrote:
On Thu, Dec 06, 2012 at 06:10:46PM +0100, Alexander Graf wrote:
You should be able to poke fw_cfg in the _STA method. The machine file could search its bus on init (or on machine create notify) and populate a fw_cfg variable to indicate whether it found an applesmc.
I don't think we should access fw_cfg from the AML code. AML code is already too fragile and I think accessing fw_cfg is just going to make it worse.
One can poke at the applesmc directly for detection ...
We should return 0x0B on success, not 0x0F, though.
Method(_STA, 0) {
Store(0x10, CMDP) // APPLESMC_READ_CMD
Store(CMDP, Local0)
If (LEqual(Local0, 0x0c)) {
Also, once you've tickled the CMDP, the SMC internal state is no longer what OS X expects, so it gets all hung up on that later during the boot process. I guess I'll put "gain thorough understanding of the qemu applesmc state machine" on my ToDo list :)
--Gabriel