[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 53/60] acpi: add aml_shiftright() term
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v2 53/60] acpi: add aml_shiftright() term |
Date: |
Mon, 1 Jun 2015 14:25:35 +0200 |
From: Marcel Apfelbaum <address@hidden>
Add encoding for ACPI DefShiftRight Opcode.
Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Shannon Zhao <address@hidden>
---
include/hw/acpi/aml-build.h | 1 +
hw/acpi/aml-build.c | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index f2100cb..9abb4c3 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -203,6 +203,7 @@ Aml *aml_store(Aml *val, Aml *target);
Aml *aml_and(Aml *arg1, Aml *arg2);
Aml *aml_or(Aml *arg1, Aml *arg2);
Aml *aml_shiftleft(Aml *arg1, Aml *count);
+Aml *aml_shiftright(Aml *arg1, Aml *count);
Aml *aml_lless(Aml *arg1, Aml *arg2);
Aml *aml_add(Aml *arg1, Aml *arg2);
Aml *aml_index(Aml *arg1, Aml *idx);
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 5c140e0..045a4e2 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -465,6 +465,16 @@ Aml *aml_shiftleft(Aml *arg1, Aml *count)
return var;
}
+/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefShiftRight */
+Aml *aml_shiftright(Aml *arg1, Aml *count)
+{
+ Aml *var = aml_opcode(0x7A /* ShiftRightOp */);
+ aml_append(var, arg1);
+ aml_append(var, count);
+ build_append_byte(var->buf, 0x00); /* NullNameOp */
+ return var;
+}
+
/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefLLess */
Aml *aml_lless(Aml *arg1, Aml *arg2)
{
--
MST
- Re: [Qemu-devel] [PULL v2 43/60] i386: drop FDC in pc-q35-2.4+ if neither it nor floppy drives are wanted, (continued)
- [Qemu-devel] [PULL v2 42/60] i386/pc_q35: don't insist on board FDC if there's no default floppy, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 44/60] acpi: Simplify printing to dynamic string, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 45/60] Add stream ID to MSI write, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 46/60] Extend TPM TIS interface to support TPM 2, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 47/60] tpm: Probe for connected TPM 1.2 or TPM 2, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 48/60] TPM2 ACPI table support, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 49/60] acpi: add aml_add() term, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 50/60] acpi: add aml_lless() term, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 51/60] acpi: add aml_index() term, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 53/60] acpi: add aml_shiftright() term,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v2 52/60] acpi: add aml_shiftleft() term, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 54/60] acpi: add aml_increment() term, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 55/60] acpi: add aml_while() term, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 56/60] hw/acpi/aml-build: Fix memory leak, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 57/60] virtio-mmio: ioeventfd support, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 58/60] qdev: add 64bit properties, Michael S. Tsirkin, 2015/06/01