qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Gabriel L. Somlo" <gsomlo@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	qemu-devel@nongnu.org, Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [PULL 1/5] acpi-build: append description for non-hotplug
Date: Wed, 19 Feb 2014 21:09:16 +0200	[thread overview]
Message-ID: <20140219190916.GB24622@redhat.com> (raw)
In-Reply-To: <20140219152450.GU29329@ERROL.INI.CMU.EDU>

On Wed, Feb 19, 2014 at 10:24:50AM -0500, Gabriel L. Somlo 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"
> > > 
> > > Your original patch (slightly doctored since it no longer applies cleanly
> > > to the current qemu git master) is included below, and still works for me.
> > 
> > Any chance below helps on top?
> 
> Nope, sorry, I'm getting the same error :(
> 
> > Another alternative is that DSDT referencing
> > SSDT does not work for apple.
> > I hope it's not that, that would be annoying...
> 
> I'm probably misunderstanding this in a major way, but when I try the
> following, just for grins:
> 
> diff --git a/hw/i386/acpi-dsdt-hpet.dsl b/hw/i386/acpi-dsdt-hpet.dsl
> index 44961b8..d4614e0 100644
> --- a/hw/i386/acpi-dsdt-hpet.dsl
> +++ b/hw/i386/acpi-dsdt-hpet.dsl
> @@ -36,6 +36,9 @@ Scope(\_SB) {
>              If (LOr(LEqual(Local1, 0), LGreater(Local1, 100000000)))
> {
>                  Return (0x0)
>              }
> +            If (LEqual(\_SB.FOBR, 0x12)) {
> +                Return (0x0)
> +            }
>              Return (0x0F)
>          }
>          Name(_CRS, ResourceTemplate() {
> diff --git a/hw/i386/ssdt-misc.dsl b/hw/i386/ssdt-misc.dsl
> index a4484b8..67d853a 100644
> --- a/hw/i386/ssdt-misc.dsl
> +++ b/hw/i386/ssdt-misc.dsl
> @@ -22,6 +22,10 @@ DefinitionBlock ("ssdt-misc.aml", "SSDT", 0x01,
> "BXPC", "BXSS
>   * PCI memory ranges
>   ****************************************************************/
>  
> +    Scope(\_SB) {
> +       Name(FOBR, 0x12)
> +    }
> +
>      Scope(\) {
>         ACPI_EXTRACT_NAME_DWORD_CONST acpi_pci32_start
>         Name(P0S, 0x12345678)
> ---
> 
> I get iasl compile errors, never even make it to the point where
> OS X would get a chance to be upset with me... :)
> 
> Thanks,
> --Gabriel

You will have to declare it with Extern in DSDT.

> > commit 12b48c660b8316b1e8ff633eb9f3f34bd4b78284
> > Author: Michael S. Tsirkin <mst@redhat.com>
> > Date:   Wed Feb 19 15:47:03 2014 +0200
> > 
> >     acpi-build: drop _SUN for non hotpluggable slots
> >     
> >     Not needed there, let's not add it.
> >     
> >     Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > 
> > diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> > index 5b0bb5a..226e59e 100644
> > --- a/hw/i386/acpi-build.c
> > +++ b/hw/i386/acpi-build.c
> > @@ -644,19 +644,16 @@ static inline char acpi_get_hex(uint32_t val)
> >  #define ACPI_PCIHP_AML (ssdp_pcihp_aml + *ssdt_pcihp_start)
> >  
> >  #define ACPI_PCINOHP_OFFSET_HEX (*ssdt_pcinohp_name - *ssdt_pcinohp_start + 1)
> > -#define ACPI_PCINOHP_OFFSET_ID (*ssdt_pcinohp_id - *ssdt_pcinohp_start)
> >  #define ACPI_PCINOHP_OFFSET_ADR (*ssdt_pcinohp_adr - *ssdt_pcinohp_start)
> >  #define ACPI_PCINOHP_SIZEOF (*ssdt_pcinohp_end - *ssdt_pcinohp_start)
> >  #define ACPI_PCINOHP_AML (ssdp_pcihp_aml + *ssdt_pcinohp_start)
> >  
> >  #define ACPI_PCIVGA_OFFSET_HEX (*ssdt_pcivga_name - *ssdt_pcivga_start + 1)
> > -#define ACPI_PCIVGA_OFFSET_ID (*ssdt_pcivga_id - *ssdt_pcivga_start)
> >  #define ACPI_PCIVGA_OFFSET_ADR (*ssdt_pcivga_adr - *ssdt_pcivga_start)
> >  #define ACPI_PCIVGA_SIZEOF (*ssdt_pcivga_end - *ssdt_pcivga_start)
> >  #define ACPI_PCIVGA_AML (ssdp_pcihp_aml + *ssdt_pcivga_start)
> >  
> >  #define ACPI_PCIQXL_OFFSET_HEX (*ssdt_pciqxl_name - *ssdt_pciqxl_start + 1)
> > -#define ACPI_PCIQXL_OFFSET_ID (*ssdt_pciqxl_id - *ssdt_pciqxl_start)
> >  #define ACPI_PCIQXL_OFFSET_ADR (*ssdt_pciqxl_adr - *ssdt_pciqxl_start)
> >  #define ACPI_PCIQXL_SIZEOF (*ssdt_pciqxl_end - *ssdt_pciqxl_start)
> >  #define ACPI_PCIQXL_AML (ssdp_pcihp_aml + *ssdt_pciqxl_start)
> > @@ -701,7 +698,6 @@ static void patch_pcinohp(int slot, uint8_t *ssdt_ptr)
> >  
> >      ssdt_ptr[ACPI_PCINOHP_OFFSET_HEX] = acpi_get_hex(devfn >> 4);
> >      ssdt_ptr[ACPI_PCINOHP_OFFSET_HEX + 1] = acpi_get_hex(devfn);
> > -    ssdt_ptr[ACPI_PCINOHP_OFFSET_ID] = slot;
> >      ssdt_ptr[ACPI_PCINOHP_OFFSET_ADR + 2] = slot;
> >  }
> >  
> > @@ -711,7 +707,6 @@ static void patch_pcivga(int slot, uint8_t *ssdt_ptr)
> >  
> >      ssdt_ptr[ACPI_PCIVGA_OFFSET_HEX] = acpi_get_hex(devfn >> 4);
> >      ssdt_ptr[ACPI_PCIVGA_OFFSET_HEX + 1] = acpi_get_hex(devfn);
> > -    ssdt_ptr[ACPI_PCIVGA_OFFSET_ID] = slot;
> >      ssdt_ptr[ACPI_PCIVGA_OFFSET_ADR + 2] = slot;
> >  }
> >  
> > @@ -721,7 +716,6 @@ static void patch_pciqxl(int slot, uint8_t *ssdt_ptr)
> >  
> >      ssdt_ptr[ACPI_PCIQXL_OFFSET_HEX] = acpi_get_hex(devfn >> 4);
> >      ssdt_ptr[ACPI_PCIQXL_OFFSET_HEX + 1] = acpi_get_hex(devfn);
> > -    ssdt_ptr[ACPI_PCIQXL_OFFSET_ID] = slot;
> >      ssdt_ptr[ACPI_PCIQXL_OFFSET_ADR + 2] = slot;
> >  }
> >  
> > diff --git a/hw/i386/ssdt-pcihp.dsl b/hw/i386/ssdt-pcihp.dsl
> > index 69a0228..ac91c05 100644
> > --- a/hw/i386/ssdt-pcihp.dsl
> > +++ b/hw/i386/ssdt-pcihp.dsl
> > @@ -53,8 +53,6 @@ DefinitionBlock ("ssdt-pcihp.aml", "SSDT", 0x01, "BXPC", "BXSSDTPCIHP", 0x1)
> >          // Extract the offsets of the device name, address dword and the slot
> >          // name byte - we fill them in for each device.
> >          Device(SBB) {
> > -            ACPI_EXTRACT_NAME_BYTE_CONST ssdt_pcinohp_id
> > -            Name(_SUN, 0xAA)
> >              ACPI_EXTRACT_NAME_DWORD_CONST ssdt_pcinohp_adr
> >              Name(_ADR, 0xAA0000)
> >          }
> > @@ -66,8 +64,6 @@ DefinitionBlock ("ssdt-pcihp.aml", "SSDT", 0x01, "BXPC", "BXSSDTPCIHP", 0x1)
> >          // Extract the offsets of the device name, address dword and the slot
> >          // name byte - we fill them in for each device.
> >          Device(SCC) {
> > -            ACPI_EXTRACT_NAME_BYTE_CONST ssdt_pcivga_id
> > -            Name(_SUN, 0xAA)
> >              ACPI_EXTRACT_NAME_DWORD_CONST ssdt_pcivga_adr
> >              Name(_ADR, 0xAA0000)
> >              Method(_S1D, 0, NotSerialized) {
> > @@ -88,8 +84,6 @@ DefinitionBlock ("ssdt-pcihp.aml", "SSDT", 0x01, "BXPC", "BXSSDTPCIHP", 0x1)
> >          // Extract the offsets of the device name, address dword and the slot
> >          // name byte - we fill them in for each device.
> >          Device(SDD) {
> > -            ACPI_EXTRACT_NAME_BYTE_CONST ssdt_pciqxl_id
> > -            Name(_SUN, 0xAA)
> >              ACPI_EXTRACT_NAME_DWORD_CONST ssdt_pciqxl_adr
> >              Name(_ADR, 0xAA0000)
> >              Method(_S1D, 0, NotSerialized) {

  reply	other threads:[~2014-02-19 19:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-17 14:25 [Qemu-devel] [PULL 0/5] acpi,pc,pci,virtio,memory bug fixes Michael S. Tsirkin
2014-02-17 14:25 ` [Qemu-devel] [PULL 1/5] acpi-build: append description for non-hotplug Michael S. Tsirkin
2014-02-17 14:51   ` Gabriel L. Somlo
2014-02-17 16:44     ` Michael S. Tsirkin
2014-02-19 13:52       ` Peter Maydell
2014-02-19 14:36         ` Michael S. Tsirkin
2014-02-19 13:50     ` Michael S. Tsirkin
2014-02-19 15:24       ` Gabriel L. Somlo
2014-02-19 19:09         ` Michael S. Tsirkin [this message]
2014-02-19 19:02       ` Michael S. Tsirkin
2014-02-19 19:45         ` Gabriel L. Somlo
2014-02-20  5:13           ` Michael S. Tsirkin
2014-02-20 14:22             ` Gabriel L. Somlo
2014-02-20 15:29               ` Michael S. Tsirkin
2014-02-19 16:09     ` Alex Williamson
2014-02-17 14:25 ` [Qemu-devel] [PULL 2/5] acpi-test-data: update expected files Michael S. Tsirkin
2014-02-17 14:25 ` [Qemu-devel] [PULL 3/5] virtio-net: remove function calls from assert Michael S. Tsirkin
2014-02-17 14:25 ` [Qemu-devel] [PULL 4/5] memory_region_present: return false if address is not found in child MemoryRegion Michael S. Tsirkin
2014-02-17 14:25 ` [Qemu-devel] [PULL 5/5] PCIE: fix regression with coldplugged multifunction device Michael S. Tsirkin
2014-02-19 14:35 ` [Qemu-devel] [PULL 0/5] acpi,pc,pci,virtio,memory bug fixes Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140219190916.GB24622@redhat.com \
    --to=mst@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=gsomlo@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).