qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 07/10] hw/i386: declare ACPI mother board resource for MMC


From: Michael S. Tsirkin
Subject: Re: [PATCH v3 07/10] hw/i386: declare ACPI mother board resource for MMCONFIG region
Date: Tue, 16 Feb 2021 08:45:48 -0500

On Tue, Feb 16, 2021 at 01:43:01AM -0800, Isaku Yamahata wrote:
> On Mon, Feb 15, 2021 at 01:48:32PM +0100,
> Igor Mammedov <imammedo@redhat.com> wrote:
> 
> > On Fri, 12 Feb 2021 12:51:57 -0800
> > Isaku Yamahata <isaku.yamahata@gmail.com> wrote:
> > 
> > > On Fri, Feb 12, 2021 at 04:40:38PM +0100,
> > > Igor Mammedov <imammedo@redhat.com> wrote:
> > > 
> > > > On Wed, 10 Feb 2021 22:46:43 -0800
> > > > Isaku Yamahata <isaku.yamahata@intel.com> wrote:
> > > >   
> > > > > +    Aml *dev;
> > > > > +    Aml *rbuf;
> > > > > +    Aml *resource_template;
> > > > > +    Aml *rbuf_name;
> > > > > +    Aml *crs;
> > > > > +
> > > > > +    if (!acpi_get_mcfg(&mcfg)) {
> > > > > +        return NULL;
> > > > > +    }
> > > > > +
> > > > > +    /* DRAM controller */
> > > > > +    dev = aml_device("DRAC");
> > > > > +    aml_append(dev, aml_name_decl("_HID", aml_string("PNP0C01")));
> > > > > +
> > > > > +    resource_template = aml_resource_template();
> > > > > +    aml_append(resource_template,
> > > > > +               aml_qword_memory(AML_POS_DECODE,
> > > > > +                                AML_MIN_FIXED,
> > > > > +                                AML_MAX_FIXED,
> > > > > +                                AML_NON_CACHEABLE,
> > > > > +                                AML_READ_WRITE,
> > > > > +                                0x0000000000000000,
> > > > > +                                mcfg.base,
> > > > > +                                mcfg.base + mcfg.size - 1,  
> > > > s/mcfg.base + mcfg.size - 1/mcfg.base/  
> > > 
> > > AddressMaximum needs to be the highest address of the region.
> > > Not base address. By disassemble/assembl it, iasl complains as follows.
> > > Also there are similar examples in acpi-build.c.
> > I mostly clean up all places to use the same base address for min/max,
> > but probably something were left behind.
> > 
> > spec says:
> > 
> > acpi 6.3: 19.6.110 QWordMemory
> > 
> > AddressMaximum evaluates to a 64-bit integer that specifies the highest 
> > possible base address of the
> > Memory range. The value must have ‘0’ in all bits where the corresponding 
> > bit in AddressGranularity is
> > ‘1’. For bridge devices which translate addresses, this is the address on 
> > the secondary bus. The 64-bit
> > field DescriptorName ._MAX is automatically created to refer to this 
> > portion of the resource descriptor.
> 
> Ok, Linux guest is happy with min=max.
> I conlude that it's iasl issue.
> 
> Thanks,

OK but what about all the other places in the code that seem to use this
field differently?

-- 
MST




reply via email to

[Prev in Thread] Current Thread [Next in Thread]