[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 13/52] acpi: extend build_append_{value|int}() to
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH v3 13/52] acpi: extend build_append_{value|int}() to support 64-bit values |
Date: |
Mon, 9 Feb 2015 10:53:35 +0000 |
it will be used for generating 64bit _CRS entries
Signed-off-by: Igor Mammedov <address@hidden>
---
hw/acpi/aml-build.c | 9 ++++++---
include/hw/acpi/aml-build.h | 4 ++--
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 5d6553c..d71b236 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -219,7 +219,7 @@ void build_extop_package(GArray *package, uint8_t op)
build_prepend_byte(package, 0x5B); /* ExtOpPrefix */
}
-void build_append_value(GArray *table, uint32_t value, int size)
+void build_append_value(GArray *table, uint64_t value, int size)
{
int i;
@@ -229,7 +229,7 @@ void build_append_value(GArray *table, uint32_t value, int
size)
}
}
-void build_append_int(GArray *table, uint32_t value)
+void build_append_int(GArray *table, uint64_t value)
{
if (value == 0x00) {
build_append_byte(table, 0x00); /* ZeroOp */
@@ -241,9 +241,12 @@ void build_append_int(GArray *table, uint32_t value)
} else if (value <= 0xFFFF) {
build_append_byte(table, 0x0B); /* WordPrefix */
build_append_value(table, value, 2);
- } else {
+ } else if (value <= 0xFFFFFFFF) {
build_append_byte(table, 0x0C); /* DWordPrefix */
build_append_value(table, value, 4);
+ } else {
+ build_append_byte(table, 0x0E); /* QWordPrefix */
+ build_append_value(table, value, 8);
}
}
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index d5d8c11..5abc56b 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -95,8 +95,8 @@ build_append_namestring(GArray *array, const char *format,
...);
void build_prepend_package_length(GArray *package);
void build_package(GArray *package, uint8_t op);
-void build_append_value(GArray *table, uint32_t value, int size);
-void build_append_int(GArray *table, uint32_t value);
+void build_append_value(GArray *table, uint64_t value, int size);
+void build_append_int(GArray *table, uint64_t value);
void build_extop_package(GArray *package, uint8_t op);
#endif
--
1.8.3.1
- Re: [Qemu-devel] [PATCH v3 05/52] acpi: add aml_def_block() term, (continued)
[Qemu-devel] [PATCH v3 04/52] acpi: factor out ACPI const int packing out of build_append_value(), Igor Mammedov, 2015/02/09
[Qemu-devel] [PATCH v3 11/52] acpi: add aml_if() term, Igor Mammedov, 2015/02/09
[Qemu-devel] [PATCH v3 16/52] acpi: add aml_arg() term, Igor Mammedov, 2015/02/09
[Qemu-devel] [PATCH v3 13/52] acpi: extend build_append_{value|int}() to support 64-bit values,
Igor Mammedov <=
[Qemu-devel] [PATCH v3 12/52] acpi: add aml_name() & aml_name_decl() term, Igor Mammedov, 2015/02/09
[Qemu-devel] [PATCH v3 19/52] acpi: add aml_notify() term, Igor Mammedov, 2015/02/09
[Qemu-devel] [PATCH v3 15/52] acpi: add aml_return() term, Igor Mammedov, 2015/02/09
[Qemu-devel] [PATCH v3 14/52] acpi: add aml_int() term, Igor Mammedov, 2015/02/09
[Qemu-devel] [PATCH v3 20/52] acpi: add aml_call1(), aml_call2(), aml_call3(), aml_call4() helpers, Igor Mammedov, 2015/02/09
[Qemu-devel] [PATCH v3 17/52] acpi: add aml_store() term, Igor Mammedov, 2015/02/09
[Qemu-devel] [PATCH v3 22/52] acpi: add aml_package() term, Igor Mammedov, 2015/02/09
[Qemu-devel] [PATCH v3 18/52] acpi: add aml_and() term, Igor Mammedov, 2015/02/09
[Qemu-devel] [PATCH v3 21/52] pc: acpi-build: drop template patching and create PCI bus tree dynamically, Igor Mammedov, 2015/02/09