qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 14/20] hw/acpi/aml-build: Add aml_or() term


From: Igor Mammedov
Subject: Re: [Qemu-devel] [PATCH v4 14/20] hw/acpi/aml-build: Add aml_or() term
Date: Fri, 10 Apr 2015 09:46:30 +0200

On Fri, 10 Apr 2015 14:15:32 +0800
Shannon Zhao <address@hidden> wrote:

> On 2015/4/9 21:35, Igor Mammedov wrote:
> > On Fri, 3 Apr 2015 18:03:46 +0800
> > Shannon Zhao <address@hidden> wrote:
> > 
> >> > From: Shannon Zhao <address@hidden>
> >> > 
> >> > Add aml_or() term and make aml_and can take three args.
> >> > Expose build_append_int_noprefix as it wiil be used by
> >> > creating a buffer.
> >> > 
> >> > Signed-off-by: Shannon Zhao <address@hidden>
> >> > Signed-off-by: Shannon Zhao <address@hidden>
> >> > ---
> >> >  hw/acpi/aml-build.c         | 24 +++++++++++++++++++++---
> >> >  hw/i386/acpi-build.c        |  2 +-
> >> >  include/hw/acpi/aml-build.h |  4 +++-
> >> >  3 files changed, 25 insertions(+), 5 deletions(-)
> >> > 
> >> > diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
> >> > index 5a94fc9..312afb6 100644
> >> > --- a/hw/acpi/aml-build.c
> >> > +++ b/hw/acpi/aml-build.c
> >> > @@ -240,7 +240,7 @@ static void build_extop_package(GArray
> >> > *package, uint8_t op) build_prepend_byte(package, 0x5B); /*
> >> > ExtOpPrefix */ }
> >> >  
> >> > -static void build_append_int_noprefix(GArray *table, uint64_t
> >> > value, int size) +void build_append_int_noprefix(GArray *table,
> >> > uint64_t value, int size) {
> >> >      int i;
> >> >  
> >> > @@ -445,12 +445,30 @@ Aml *aml_store(Aml *val, Aml *target)
> >> >  }
> >> >  
> >> >  /* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefAnd */
> >> > -Aml *aml_and(Aml *arg1, Aml *arg2)
> >> > +Aml *aml_and(Aml *arg1, Aml *arg2, Aml *arg3)
> > I know that it's possible to Store inside of And(a, b, save_here)
> > ASL op, but could you instead rewrite it to
> > 
> >  Store(And(a, b), save_here)
> > 
> > so it wouldn't clatter trivial  And(a,b) uses and drop this hunk.
> > 
> Yes, we can use Store(And(a, b), save_here) but according to the SPEC
> the And op can have 3 args. We don't support it?
I don't think that we should do it if it could be implemented
using 2 already existing API calls to keep it simple and not to
pollute code with extra ", NULL" argument in most cases.







reply via email to

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