[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 09/47] acpi: add acpi_int() term
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH v2 09/47] acpi: add acpi_int() term |
Date: |
Thu, 22 Jan 2015 14:49:53 +0000 |
Signed-off-by: Igor Mammedov <address@hidden>
---
hw/acpi/acpi-build-utils.c | 11 +++++++++++
include/hw/acpi/acpi-build-utils.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/hw/acpi/acpi-build-utils.c b/hw/acpi/acpi-build-utils.c
index b68e1d8..745e58b 100644
--- a/hw/acpi/acpi-build-utils.c
+++ b/hw/acpi/acpi-build-utils.c
@@ -305,6 +305,17 @@ static AcpiAml aml_allocate_internal(uint8_t op,
AcpiBlockFlags flags)
}
/*
+ * ACPI 5.0: 20.2.3 Data Objects Encoding:
+ * encodes: ByteConst, WordConst, DWordConst, QWordConst, ZeroOp, OneOp
+ */
+AcpiAml acpi_int(const uint64_t val)
+{
+ AcpiAml var = aml_allocate_internal(0, NON_BLOCK);
+ build_append_int(var.buf, val);
+ return var;
+}
+
+/*
* help to construct NameString, which return AcpiAml object
* for using with other aml_append or other acpi_* terms
*/
diff --git a/include/hw/acpi/acpi-build-utils.h
b/include/hw/acpi/acpi-build-utils.h
index d21e107..2ea53f9 100644
--- a/include/hw/acpi/acpi-build-utils.h
+++ b/include/hw/acpi/acpi-build-utils.h
@@ -22,6 +22,7 @@ typedef struct AcpiAml {
void aml_append(AcpiAml *parent_ctx, AcpiAml child);
/* non block ASL object primitives */
+AcpiAml acpi_int(const uint64_t val);
AcpiAml GCC_FMT_ATTR(1, 2) acpi_name(const char *name_format, ...);
AcpiAml acpi_name_decl(const char *name, AcpiAml val);
/* Block ASL object primitives */
--
1.8.3.1
- [Qemu-devel] [PATCH 07/13] acpi: make toplevel ACPI tables blob a dedicated object, (continued)
- [Qemu-devel] [PATCH 07/13] acpi: make toplevel ACPI tables blob a dedicated object, Igor Mammedov, 2015/01/28
- [Qemu-devel] [PATCH 11/13] acpi: acpi_add_table() to common cross target file, Igor Mammedov, 2015/01/28
- [Qemu-devel] [PATCH 12/13] acpi: prepare for API internal collection of RSDT entries, Igor Mammedov, 2015/01/28
- [Qemu-devel] [PATCH 13/13] i386: acpi: mark SSDT as RSDT entry so API would add entry to RSDT automatically, Igor Mammedov, 2015/01/28
- [Qemu-devel] [PATCH 06/13] acpi: use TYPE_AML_OBJECT for toplevel ACPI tables blob, Igor Mammedov, 2015/01/28
- Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append(), Michael S. Tsirkin, 2015/01/28
- Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append(), Igor Mammedov, 2015/01/28
- Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append(), Michael S. Tsirkin, 2015/01/28
- Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append(), Claudio Fontana, 2015/01/28
Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append(), Michael S. Tsirkin, 2015/01/23
[Qemu-devel] [PATCH v2 09/47] acpi: add acpi_int() term,
Igor Mammedov <=
Re: [Qemu-devel] [PATCH v2 00/47] ACPI refactoring: replace template patching with C ASL API, Michael S. Tsirkin, 2015/01/28