qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

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