|
|
8be556 |
From a27bc2d9b2b7ad55c5eb35e98890889aafb216cc Mon Sep 17 00:00:00 2001
|
|
|
8be556 |
From: Marcel Apfelbaum <marcel@redhat.com>
|
|
|
8be556 |
Date: Wed, 24 Jun 2015 13:53:14 +0200
|
|
|
8be556 |
Subject: [PATCH 192/217] acpi: add aml_index() term
|
|
|
8be556 |
|
|
|
8be556 |
Message-id: <1435154016-26233-22-git-send-email-marcel@redhat.com>
|
|
|
8be556 |
Patchwork-id: 66447
|
|
|
8be556 |
O-Subject: [RHEL-7.2 qemu-kvm-rhev PATCH 21/43] acpi: add aml_index() term
|
|
|
8be556 |
Bugzilla: 1103313
|
|
|
8be556 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
8be556 |
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
8be556 |
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
8be556 |
|
|
|
8be556 |
Add encoding for ACPI DefIndex Opcode.
|
|
|
8be556 |
|
|
|
8be556 |
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
|
|
|
8be556 |
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
8be556 |
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
8be556 |
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
|
|
|
8be556 |
(cherry picked from commit 928b8996576875f9364f77c5a41f12cd55c7b9f7)
|
|
|
8be556 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
8be556 |
---
|
|
|
8be556 |
hw/acpi/aml-build.c | 10 ++++++++++
|
|
|
8be556 |
include/hw/acpi/aml-build.h | 1 +
|
|
|
8be556 |
2 files changed, 11 insertions(+)
|
|
|
8be556 |
|
|
|
8be556 |
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
|
|
|
8be556 |
index 5423001..b5ef9d7 100644
|
|
|
8be556 |
--- a/hw/acpi/aml-build.c
|
|
|
8be556 |
+++ b/hw/acpi/aml-build.c
|
|
|
8be556 |
@@ -475,6 +475,16 @@ Aml *aml_add(Aml *arg1, Aml *arg2)
|
|
|
8be556 |
return var;
|
|
|
8be556 |
}
|
|
|
8be556 |
|
|
|
8be556 |
+/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefIndex */
|
|
|
8be556 |
+Aml *aml_index(Aml *arg1, Aml *idx)
|
|
|
8be556 |
+{
|
|
|
8be556 |
+ Aml *var = aml_opcode(0x88 /* IndexOp */);
|
|
|
8be556 |
+ aml_append(var, arg1);
|
|
|
8be556 |
+ aml_append(var, idx);
|
|
|
8be556 |
+ build_append_byte(var->buf, 0x00 /* NullNameOp */);
|
|
|
8be556 |
+ return var;
|
|
|
8be556 |
+}
|
|
|
8be556 |
+
|
|
|
8be556 |
/* ACPI 1.0b: 16.2.5.3 Type 1 Opcodes Encoding: DefNotify */
|
|
|
8be556 |
Aml *aml_notify(Aml *arg1, Aml *arg2)
|
|
|
8be556 |
{
|
|
|
8be556 |
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
|
|
|
8be556 |
index 3007cb5..d0de08f 100644
|
|
|
8be556 |
--- a/include/hw/acpi/aml-build.h
|
|
|
8be556 |
+++ b/include/hw/acpi/aml-build.h
|
|
|
8be556 |
@@ -204,6 +204,7 @@ Aml *aml_and(Aml *arg1, Aml *arg2);
|
|
|
8be556 |
Aml *aml_or(Aml *arg1, Aml *arg2);
|
|
|
8be556 |
Aml *aml_lless(Aml *arg1, Aml *arg2);
|
|
|
8be556 |
Aml *aml_add(Aml *arg1, Aml *arg2);
|
|
|
8be556 |
+Aml *aml_index(Aml *arg1, Aml *idx);
|
|
|
8be556 |
Aml *aml_notify(Aml *arg1, Aml *arg2);
|
|
|
8be556 |
Aml *aml_call1(const char *method, Aml *arg1);
|
|
|
8be556 |
Aml *aml_call2(const char *method, Aml *arg1, Aml *arg2);
|
|
|
8be556 |
--
|
|
|
8be556 |
1.8.3.1
|
|
|
8be556 |
|