[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V7 06/24] acpi: add aml_shiftright() term
From: |
Marcel Apfelbaum |
Subject: |
[Qemu-devel] [PATCH V7 06/24] acpi: add aml_shiftright() term |
Date: |
Mon, 25 May 2015 18:33:44 +0300 |
Add encoding for ACPI DefShiftRight Opcode.
Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: Marcel Apfelbaum <address@hidden>
---
hw/acpi/aml-build.c | 10 ++++++++++
include/hw/acpi/aml-build.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 4d45610..f3733b3 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -474,6 +474,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)
{
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index 6391331..e1dab5a 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -165,6 +165,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);
--
2.1.0
- [Qemu-devel] [PATCH V7 00/24] hw/pc: implement multiple primary busses for pc machines, Marcel Apfelbaum, 2015/05/25
- [Qemu-devel] [PATCH V7 01/24] acpi: add aml_or() term, Marcel Apfelbaum, 2015/05/25
- [Qemu-devel] [PATCH V7 03/24] acpi: add aml_lless() term, Marcel Apfelbaum, 2015/05/25
- [Qemu-devel] [PATCH V7 04/24] acpi: add aml_index() term, Marcel Apfelbaum, 2015/05/25
- [Qemu-devel] [PATCH V7 02/24] acpi: add aml_add() term, Marcel Apfelbaum, 2015/05/25
- [Qemu-devel] [PATCH V7 05/24] acpi: add aml_shiftleft() term, Marcel Apfelbaum, 2015/05/25
- [Qemu-devel] [PATCH V7 06/24] acpi: add aml_shiftright() term,
Marcel Apfelbaum <=
- [Qemu-devel] [PATCH V7 07/24] acpi: add aml_increment() term, Marcel Apfelbaum, 2015/05/25
- [Qemu-devel] [PATCH V7 08/24] acpi: add aml_while() term, Marcel Apfelbaum, 2015/05/25
- [Qemu-devel] [PATCH V7 09/24] hw/pci: made pci_bus_is_root a PCIBusClass method, Marcel Apfelbaum, 2015/05/25
- [Qemu-devel] [PATCH V7 10/24] hw/pci: made pci_bus_num a PCIBusClass method, Marcel Apfelbaum, 2015/05/25
- [Qemu-devel] [PATCH V7 11/24] hw/i386: query only for q35/pc when looking for pci host bridge, Marcel Apfelbaum, 2015/05/25
- [Qemu-devel] [PATCH V7 12/24] hw/pci: extend PCI config access to support devices behind PXB, Marcel Apfelbaum, 2015/05/25
- [Qemu-devel] [PATCH V7 14/24] hw/apci: add _PRT method for extra PCI root busses, Marcel Apfelbaum, 2015/05/25
- [Qemu-devel] [PATCH V7 13/24] hw/acpi: add support for i440fx 'snooping' root busses, Marcel Apfelbaum, 2015/05/25
- [Qemu-devel] [PATCH V7 15/24] hw/acpi: add _CRS method for extra root busses, Marcel Apfelbaum, 2015/05/25