qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Shannon Zhao <zhaoshenglong@huawei.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: peter.maydell@linaro.org, hangaohuai@huawei.com, mst@redhat.com,
	a.spyridakis@virtualopensystems.com, claudio.fontana@huawei.com,
	qemu-devel@nongnu.org, peter.huangpeng@huawei.com,
	alex.bennee@linaro.org, hanjun.guo@linaro.org,
	pbonzini@redhat.com, lersek@redhat.com,
	christoffer.dall@linaro.org, shannon.zhao@linaro.org
Subject: Re: [Qemu-devel] [RESEND PATCH 05/23] hw/acpi/aml-build: Add aml_interrupt() term
Date: Wed, 20 May 2015 19:28:26 +0800	[thread overview]
Message-ID: <555C6FDA.2090607@huawei.com> (raw)
In-Reply-To: <20150520130538.0fe532ce@nial.brq.redhat.com>



On 2015/5/20 19:05, Igor Mammedov wrote:
> On Wed, 20 May 2015 12:23:02 +0800
> Shannon Zhao <zhaoshenglong@huawei.com> wrote:
> 
>> > From: Shannon Zhao <shannon.zhao@linaro.org>
>> > 
>> > Add aml_interrupt() for describing device interrupt in resource template.
>> > These can be used to generating DSDT table for ACPI on ARM.
>> > 
>> > Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
>> > Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
>> > ---
>> >  hw/acpi/aml-build.c         | 22 ++++++++++++++++++++++
>> >  include/hw/acpi/aml-build.h | 42 ++++++++++++++++++++++++++++++++++++++++++
>> >  2 files changed, 64 insertions(+)
>> > 
>> > diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
>> > index 805a0ad..5f06367 100644
>> > --- a/hw/acpi/aml-build.c
>> > +++ b/hw/acpi/aml-build.c
>> > @@ -531,6 +531,28 @@ Aml *aml_memory32_fixed(uint32_t addr, uint32_t size,
>> >      return var;
>> >  }
>> >  
>> > +/*
>> > + * ACPI 5.0: 6.4.3.6 Extended Interrupt Descriptor
>> > + * Type 1, Large Item Name 0x9
>> > + */
>> > +Aml *aml_interrupt(AmlConsumerAndProducer con_and_pro,
>> > +                   AmlLevelAndEdge level_and_edge,
>> > +                   AmlActiveHighAndLow high_and_low, AmlShared shared,
>> > +                   uint32_t irq)
>> > +{
>> > +    Aml *var = aml_alloc();
>> > +    uint8_t irq_flags = con_and_pro | (level_and_edge << 1)
>> > +                        | (high_and_low << 2) | (shared << 3);
>> > +
>> > +    build_append_byte(var->buf, 0x89); /* Extended irq descriptor */
>> > +    build_append_byte(var->buf, 6); /* Length, bits[7:0] minimum value = 6 */
>> > +    build_append_byte(var->buf, 0); /* Length, bits[15:8] minimum value = 0 */
>> > +    build_append_byte(var->buf, irq_flags); /* Interrupt Vector Information. */
>> > +    build_append_byte(var->buf, 0x01); /* Interrupt table length = 1 */
>> > +    build_append_4bytes(var->buf, irq); /* Interrupt Number */
> Just looking at the patch I have no idea what above line does;
> 
> using 4 build_append_byte() is much clearer and matches the spec 1:1
> when comparing.
> 

I feel awkward and have no word to convince you. If you insist on this,
I'll go back to 4 build_append_byte().

-- 
Shannon

  reply	other threads:[~2015-05-20 11:35 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14  9:19 [Qemu-devel] [PATCH v7 00/23] Generate ACPI v5.1 tables and expose them to guest over fw_cfg on ARM Shannon Zhao
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 01/23] hw/arm/virt: Move common definitions to virt.h Shannon Zhao
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 02/23] hw/arm/virt: Record PCIe ranges in MemMapEntry array Shannon Zhao
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 03/23] hw/arm/virt-acpi-build: Basic framework for building ACPI tables on ARM Shannon Zhao
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 04/23] hw/acpi/aml-build: Add aml_memory32_fixed() term Shannon Zhao
2015-05-18 16:06   ` Michael S. Tsirkin
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 05/23] hw/acpi/aml-build: Add aml_interrupt() term Shannon Zhao
2015-05-18 16:07   ` Michael S. Tsirkin
2015-05-20  4:23   ` [Qemu-devel] [RESEND PATCH " Shannon Zhao
2015-05-20 11:05     ` Igor Mammedov
2015-05-20 11:28       ` Shannon Zhao [this message]
2015-05-20 13:49         ` Igor Mammedov
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 06/23] hw/arm/virt-acpi-build: Generation of DSDT table for virt devices Shannon Zhao
2015-05-21 14:30   ` Alex Bennée
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 07/23] hw/arm/virt-acpi-build: Generate FADT table and update ACPI headers Shannon Zhao
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 08/23] hw/arm/virt-acpi-build: Generate MADT table Shannon Zhao
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 09/23] hw/arm/virt-acpi-build: Generate GTDT table Shannon Zhao
2015-05-21 14:31   ` Alex Bennée
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 10/23] hw/arm/virt-acpi-build: Generate RSDT table Shannon Zhao
2015-05-21 14:38   ` Alex Bennée
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 11/23] hw/arm/virt-acpi-build: Generate RSDP table Shannon Zhao
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 12/23] hw/arm/virt-acpi-build: Generate MCFG table Shannon Zhao
2015-05-21 14:38   ` Alex Bennée
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 13/23] hw/acpi/aml-build: Make aml_buffer() definition consistent with the spec Shannon Zhao
2015-05-18 16:08   ` Michael S. Tsirkin
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 14/23] hw/acpi/aml-build: Add ToUUID macro Shannon Zhao
2015-05-18 16:17   ` Michael S. Tsirkin
2015-05-18 18:34     ` Laszlo Ersek
2015-05-19  0:41     ` Shannon Zhao
2015-05-19  8:37       ` Michael S. Tsirkin
2015-05-20  4:19   ` [Qemu-devel] [RESEND PATCH " Shannon Zhao
2015-05-20 10:57     ` Igor Mammedov
2015-05-20 11:02       ` Shannon Zhao
2015-05-20 13:41         ` Igor Mammedov
2015-05-20 13:46           ` Shannon Zhao
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 15/23] hw/acpi/aml-build: Add aml_or() term Shannon Zhao
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 16/23] hw/acpi/aml-build: Add aml_lnot() term Shannon Zhao
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 17/23] hw/acpi/aml-build: Add aml_else() term Shannon Zhao
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 18/23] hw/acpi/aml-build: Add aml_create_dword_field() term Shannon Zhao
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 19/23] hw/acpi/aml-build: Add aml_dword_io() term Shannon Zhao
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 20/23] hw/acpi/aml-build: Add Unicode macro Shannon Zhao
2015-05-18 16:18   ` Michael S. Tsirkin
2015-05-20  5:00   ` [Qemu-devel] [RESEND PATCH " Shannon Zhao
2015-05-20 11:01     ` Igor Mammedov
2015-05-20 11:12       ` Shannon Zhao
2015-05-20 13:47         ` Igor Mammedov
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 21/23] hw/arm/virt-acpi-build: Add PCIe controller in ACPI DSDT table Shannon Zhao
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 22/23] ACPI: split CONFIG_ACPI into 4 pieces Shannon Zhao
2015-05-18 16:19   ` Michael S. Tsirkin
2015-05-20  5:02   ` [Qemu-devel] [RESEND PATCH " Shannon Zhao
2015-05-14  9:19 ` [Qemu-devel] [PATCH v7 23/23] hw/arm/virt: Enable dynamic generation of ACPI v5.1 tables Shannon Zhao
2015-05-18 15:59 ` [Qemu-devel] [PATCH v7 00/23] Generate ACPI v5.1 tables and expose them to guest over fw_cfg on ARM 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=555C6FDA.2090607@huawei.com \
    --to=zhaoshenglong@huawei.com \
    --cc=a.spyridakis@virtualopensystems.com \
    --cc=alex.bennee@linaro.org \
    --cc=christoffer.dall@linaro.org \
    --cc=claudio.fontana@huawei.com \
    --cc=hangaohuai@huawei.com \
    --cc=hanjun.guo@linaro.org \
    --cc=imammedo@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shannon.zhao@linaro.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).