From patchwork Wed Feb 19 19:45:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gabriel L. Somlo" X-Patchwork-Id: 321994 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id CCCA12C00C4 for ; Thu, 20 Feb 2014 06:47:56 +1100 (EST) Received: from localhost ([::1]:33447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGD7Z-0001Ei-Tv for incoming@patchwork.ozlabs.org; Wed, 19 Feb 2014 14:47:53 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGD7D-0001EQ-Tz for qemu-devel@nongnu.org; Wed, 19 Feb 2014 14:47:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGD78-0006di-F0 for qemu-devel@nongnu.org; Wed, 19 Feb 2014 14:47:31 -0500 Received: from mail-qc0-x229.google.com ([2607:f8b0:400d:c01::229]:61537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGD78-0006dS-AG for qemu-devel@nongnu.org; Wed, 19 Feb 2014 14:47:26 -0500 Received: by mail-qc0-f169.google.com with SMTP id w7so1444002qcr.14 for ; Wed, 19 Feb 2014 11:47:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=nu5n7IwdpfkqmuTeoF/lUOOpW/B0J2DtJ2P+cJPRKcI=; b=YPkAVlP5ZDnsXO8otktBprKZvmPBrrmRPgb0Bp6M5Mj9t7sgDSd+hIvfLMradV1k4k OAcG7iJNbas3wcAjRsPLY3Nu2MhgPiZhLLYepBvPALL1chJoOnl3gyeWeVJ7aSjQEkkY 7tf6lrRoKP1mdET7cvmYUQP8k9GU3uZdCq4+U74iJh5iaPqpL3NVHKoq6isLX+RvMWNP x2eStZB4kShZuhEO74edStwTwVLJI3LQhAWy4CWmSie7s9ooRBtCKwV9/cjKa44q25VM 1189JKA80mM8MGRnpaD+pCKAS50KmvWMHLllPSxQvmu0dNbvui1fwWjuC3EI4GCMnLyT 01nw== X-Received: by 10.224.88.131 with SMTP id a3mr53935181qam.34.1392839245471; Wed, 19 Feb 2014 11:47:25 -0800 (PST) Received: from ERROL.INI.CMU.EDU (ERROL.INI.CMU.EDU. [128.2.16.43]) by mx.google.com with ESMTPSA id v33sm2618212qgd.10.2014.02.19.11.47.24 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 19 Feb 2014 11:47:24 -0800 (PST) Date: Wed, 19 Feb 2014 14:45:29 -0500 From: "Gabriel L. Somlo" To: "Michael S. Tsirkin" Message-ID: <20140219194528.GW29329@ERROL.INI.CMU.EDU> References: <1392647087-23020-1-git-send-email-mst@redhat.com> <1392647087-23020-2-git-send-email-mst@redhat.com> <20140217145138.GJ29329@ERROL.INI.CMU.EDU> <20140219135022.GA17601@redhat.com> <20140219190215.GA24591@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140219190215.GA24591@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c01::229 Cc: Peter Maydell , qemu-devel@nongnu.org, Anthony Liguori Subject: Re: [Qemu-devel] [PULL 1/5] acpi-build: append description for non-hotplug X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On Wed, Feb 19, 2014 at 09:02:15PM +0200, Michael S. Tsirkin wrote: > On Wed, Feb 19, 2014 at 03:50:22PM +0200, Michael S. Tsirkin wrote: > > On Mon, Feb 17, 2014 at 09:51:39AM -0500, Gabriel L. Somlo wrote: > > > With this latest version of your patch, I crash during OS X boot with > > > "unable to find driver for this platform:\"ACPI\".\n"@/SourceCache/xnu/xnu-2050.48.12/iokit/Kernel/IOPlatformExpert.cpp:1514" > > > > > Any chance below helps on top? > > Another alternative is that DSDT referencing > > SSDT does not work for apple. > > I hope it's not that, that would be annoying... > > OK I think it's that unfortunately. > The following on top should help. > Can you confirm please? > > Thanks a lot for the report! > > commit a0ad25b1e5d0eb21cbba001799341bd6b557e995 > Author: Michael S. Tsirkin > Date: Wed Feb 19 17:20:56 2014 +0200 > > Don't call SSDT from DSDT > > Windows XP doesn't like this. > Apparently, neither does Mac OSX. > > Signed-off-by: Michael S. Tsirkin > Tested-by: "Gabriel L. Somlo" Sorry, still the same error :( However, I think OS X can reference SSDT from DSDT just fine: --- The above works great. If I set FOBR to e.g. 0x13, the boot process hangs due to the lack of an available SMC, but otherwise does not crash and burn (like, witha "can't find driver for platform" error). With FOBR set to Zero, OS X boots up all the way and works without any issues... Thanks, --Gabriel diff --git a/hw/i386/acpi-dsdt-isa.dsl b/hw/i386/acpi-dsdt-isa.dsl index deb37de..06e37f5 100644 --- a/hw/i386/acpi-dsdt-isa.dsl +++ b/hw/i386/acpi-dsdt-isa.dsl @@ -13,6 +13,8 @@ * with this program; if not, see . */ +External(\_SB.FOBR, IntObj) + /* Common legacy ISA style devices. */ Scope(\_SB.PCI0.ISA) { @@ -20,7 +22,13 @@ Scope(\_SB.PCI0.ISA) { Name(_HID, EisaId("APP0001")) /* _STA will be patched to 0x0B if AppleSMC is present */ ACPI_EXTRACT_NAME_BYTE_CONST DSDT_APPLESMC_STA - Name(_STA, 0xF0) + Name(_STF, 0xF0) /* get this out of the way temporarily */ + Method(_STA, 0, NotSerialized) { + If (LGreater(\_SB.FOBR, Zero)) { + Return (0x0) + } + Return (0x0B) + } Name(_CRS, ResourceTemplate () { IO (Decode16, 0x0300, 0x0300, 0x01, 0x20) IRQNoFlags() { 6 } diff --git a/hw/i386/ssdt-misc.dsl b/hw/i386/ssdt-misc.dsl index a4484b8..a0be34b 100644 --- a/hw/i386/ssdt-misc.dsl +++ b/hw/i386/ssdt-misc.dsl @@ -22,6 +22,10 @@ DefinitionBlock ("ssdt-misc.aml", "SSDT", 0x01, "BXPC", "BXSSDTSUSP", 0x1) * PCI memory ranges ****************************************************************/ + Scope(\_SB) { + Name(FOBR, Zero) + } + Scope(\) { ACPI_EXTRACT_NAME_DWORD_CONST acpi_pci32_start Name(P0S, 0x12345678)