qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 31/52] acpi: add aml_local() term


From: Igor Mammedov
Subject: Re: [Qemu-devel] [PATCH v3 31/52] acpi: add aml_local() term
Date: Tue, 17 Feb 2015 15:06:59 +0100

On Tue, 17 Feb 2015 13:18:19 +0100
"Michael S. Tsirkin" <address@hidden> wrote:

> On Mon, Feb 09, 2015 at 10:53:53AM +0000, Igor Mammedov wrote:
> > Signed-off-by: Igor Mammedov <address@hidden>
> > ---
> 
> This causes asserts.
> 
> >  hw/acpi/aml-build.c         | 11 +++++++++++
> >  include/hw/acpi/aml-build.h |  1 +
> >  2 files changed, 12 insertions(+)
> > 
> > diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
> > index 10995a9..cb58e19 100644
> > --- a/hw/acpi/aml-build.c
> > +++ b/hw/acpi/aml-build.c
> > @@ -647,3 +647,14 @@ Aml *aml_field(const char *name, AmlFieldFlags flags)
> >      build_append_byte(var->buf, flags);
> >      return var;
> >  }
> > +
> > +/* ACPI 1.0b: 16.2.6.2 Local Objects Encoding */
> > +Aml *aml_local(int num)
> > +{
> > +    Aml *var;
> > +    uint8_t op = 0x60 /* Local0Op */ + num;
> 
> So op is 0x6X here.
> 
> > +
> > +    assert(op <= 7);
> 
> And here we assert it is <= 7?
yep, it should s/op/num/

I'm sorry for not running make check on the last iteration,
I'll post fixup shortly.
> 
> 
> > +    var = aml_opcode(op);
> > +    return var;
> > +}
> > diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
> > index 8b954d9..6e25315 100644
> > --- a/include/hw/acpi/aml-build.h
> > +++ b/include/hw/acpi/aml-build.h
> > @@ -101,6 +101,7 @@ Aml *aml_io(AmlIODecode dec, uint16_t min_base, 
> > uint16_t max_base,
> >  Aml *aml_operation_region(const char *name, AmlRegionSpace rs,
> >                            uint32_t offset, uint32_t len);
> >  Aml *aml_named_field(const char *name, unsigned length);
> > +Aml *aml_local(int num);
> >  
> >  /* Block AML object primitives */
> >  Aml *aml_def_block(const char *signature, uint8_t revision,
> > -- 
> > 1.8.3.1




reply via email to

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