[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: |
Shannon Zhao |
Subject: |
Re: [Qemu-devel] [PATCH v4 14/20] hw/acpi/aml-build: Add aml_or() term |
Date: |
Fri, 10 Apr 2015 14:15:32 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
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?
--
Thanks,
Shannon
- Re: [Qemu-devel] [PATCH v4 03/20] hw/arm/virt-acpi-build: Basic framework for building ACPI tables on ARM, (continued)
[Qemu-devel] [PATCH v4 14/20] hw/acpi/aml-build: Add aml_or() term, Shannon Zhao, 2015/04/03
[Qemu-devel] [PATCH v4 13/20] hw/acpi/aml-build: Add ToUUID macro, Shannon Zhao, 2015/04/03
[Qemu-devel] [PATCH v4 02/20] hw/i386/acpi-build: move generic acpi building helpers into dedictated file, Shannon Zhao, 2015/04/03
[Qemu-devel] [PATCH v4 09/20] hw/arm/virt-acpi-build: Generate GTDT table, Shannon Zhao, 2015/04/03