[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 09/52] acpi: add aml_device() term
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH v3 09/52] acpi: add aml_device() term |
Date: |
Mon, 9 Feb 2015 10:53:31 +0000 |
Signed-off-by: Igor Mammedov <address@hidden>
---
hw/acpi/aml-build.c | 11 +++++++++++
include/hw/acpi/aml-build.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 31a3786..e38a222 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -393,3 +393,14 @@ Aml *aml_scope(const char *name_format, ...)
va_end(ap);
return var;
}
+
+/* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefDevice */
+Aml *aml_device(const char *name_format, ...)
+{
+ va_list ap;
+ Aml *var = aml_bundle(0x82 /* DeviceOp */, AML_EXT_PACKAGE);
+ va_start(ap, name_format);
+ build_append_namestringv(var->buf, name_format, ap);
+ va_end(ap);
+ return var;
+}
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index 35f1099..dfc725e 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -75,6 +75,7 @@ Aml *aml_def_block(const char *signature, uint8_t revision,
uint32_t oem_revision, uint32_t creator_id,
uint32_t creator_revision);
Aml *aml_scope(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
+Aml *aml_device(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
/* other helpers */
GArray *build_alloc_array(void);
--
1.8.3.1
[Qemu-devel] [PATCH v3 07/52] acpi: add aml_scope() term, Igor Mammedov, 2015/02/09
[Qemu-devel] [PATCH v3 05/52] acpi: add aml_def_block() term, Igor Mammedov, 2015/02/09