[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 21/47] acpi: add acpi_resource_template() hel
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH v2 21/47] acpi: add acpi_resource_template() helper |
Date: |
Tue, 27 Jan 2015 15:41:11 +0200 |
On Tue, Jan 27, 2015 at 02:26:34PM +0100, Claudio Fontana wrote:
> Hello Igor,
>
> On 22.01.2015 15:50, Igor Mammedov wrote:
> > Signed-off-by: Igor Mammedov <address@hidden>
> > ---
> > hw/acpi/acpi-build-utils.c | 8 ++++++++
> > include/hw/acpi/acpi-build-utils.h | 1 +
> > 2 files changed, 9 insertions(+)
> >
> > diff --git a/hw/acpi/acpi-build-utils.c b/hw/acpi/acpi-build-utils.c
> > index 2d5e77a..32a4377 100644
> > --- a/hw/acpi/acpi-build-utils.c
> > +++ b/hw/acpi/acpi-build-utils.c
> > @@ -493,6 +493,14 @@ AcpiAml GCC_FMT_ATTR(1, 2) acpi_device(const char
> > *name_format, ...)
> > return var;
> > }
> >
>
> > +/* ResourceTemplate marcos helper */
>
> Since you have been so careful about putting references to the spec
> everywhere else,
> what about adding something for ResourceTemplate macros too (note typo above)?
>
> For example 19.2.3 "ASL Resource Templates" if that's the right one. (I am
> looking at version 5.1)
Pls don't, pls refer to the oldest spec that has support
for a given feature, not the newest one.
> Thanks,
>
> Claudio
>
> > +AcpiAml acpi_resource_template(void)
> > +{
> > + /* ResourceTemplate is a buffer of Resources with EndTag at the end */
> > + AcpiAml var = aml_allocate_internal(0x11 /* BufferOp */, RES_TEMPLATE);
> > + return var;
> > +}
> > +
> > /* ACPI 5.0: 20.2.5.4 Type 2 Opcodes Encoding: DefBuffer */
> > AcpiAml acpi_buffer(void)
> > {
> > diff --git a/include/hw/acpi/acpi-build-utils.h
> > b/include/hw/acpi/acpi-build-utils.h
> > index a79c085..594fae7 100644
> > --- a/include/hw/acpi/acpi-build-utils.h
> > +++ b/include/hw/acpi/acpi-build-utils.h
> > @@ -46,6 +46,7 @@ AcpiAml acpi_method(const char *name, int arg_count);
> > AcpiAml GCC_FMT_ATTR(1, 2) acpi_scope(const char *name_format, ...);
> > AcpiAml GCC_FMT_ATTR(1, 2) acpi_device(const char *name_format, ...);
> > AcpiAml acpi_buffer(void);
> > +AcpiAml acpi_resource_template(void);
> > AcpiAml acpi_package(uint8_t num_elements);
> >
> > /* other helpers */
> >
>
>
- [Qemu-devel] [PATCH v2 07/47] acpi: factor out ACPI const int packing out build_append_value(), (continued)
- [Qemu-devel] [PATCH v2 07/47] acpi: factor out ACPI const int packing out build_append_value(), Igor Mammedov, 2015/01/22
- [Qemu-devel] [PATCH v2 12/47] acpi: add acpi_store() term, Igor Mammedov, 2015/01/22
- [Qemu-devel] [PATCH v2 15/47] acpi: add acpi_call1(), acpi_call2(), acpi_call3(), acpi_call4() helpers, Igor Mammedov, 2015/01/22
- [Qemu-devel] [PATCH v2 13/47] acpi: add acpi_and() term, Igor Mammedov, 2015/01/22
- [Qemu-devel] [PATCH v2 08/47] acpi: extend build_append_{value|int}() to support 64-bit values, Igor Mammedov, 2015/01/22
- [Qemu-devel] [PATCH v2 18/47] pc: acpi-build: drop unsupported PM1b_CNT.SLP_TYP, Igor Mammedov, 2015/01/22
- [Qemu-devel] [PATCH v2 16/47] pc: acpi-build: drop template patching and create PCI bus tree dynamically, Igor Mammedov, 2015/01/22
- [Qemu-devel] [PATCH v2 14/47] acpi: add acpi_notify() term, Igor Mammedov, 2015/01/22
- [Qemu-devel] [PATCH v2 21/47] acpi: add acpi_resource_template() helper, Igor Mammedov, 2015/01/22
- [Qemu-devel] [PATCH v2 24/47] acpi: add acpi_operation_region() term, Igor Mammedov, 2015/01/22
- [Qemu-devel] [PATCH v2 19/47] pc: acpi-build: generate _S[345] packages dynamically, Igor Mammedov, 2015/01/22
- [Qemu-devel] [PATCH v2 22/47] acpi: add acpi_io() helper, Igor Mammedov, 2015/01/22
- [Qemu-devel] [PATCH v2 25/47] acpi: add acpi_field() & acpi_named_field() terms, Igor Mammedov, 2015/01/22
- [Qemu-devel] [PATCH v2 23/47] acpi: include PkgLength size only when requested, Igor Mammedov, 2015/01/22
- [Qemu-devel] [PATCH v2 26/47] acpi: add acpi_local0() term, Igor Mammedov, 2015/01/22
- [Qemu-devel] [PATCH v2 20/47] acpi: add acpi_buffer() term, Igor Mammedov, 2015/01/22
- [Qemu-devel] [PATCH v2 28/47] pc: acpi-build: generate pvpanic device description dynamically, Igor Mammedov, 2015/01/22
- [Qemu-devel] [PATCH v2 27/47] acpi: add acpi_string() term, Igor Mammedov, 2015/01/22
- [Qemu-devel] [PATCH v2 29/47] acpi: add acpi_varpackage() term, Igor Mammedov, 2015/01/22