[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v3 12/26] acpi: add acpi_irq_no_flags() term
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v3 12/26] acpi: add acpi_irq_no_flags() term |
Date: |
Mon, 2 Mar 2015 11:59:18 +0100 |
From: Igor Mammedov <address@hidden>
Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
include/hw/acpi/aml-build.h | 1 +
hw/acpi/aml-build.c | 21 +++++++++++++++++++++
2 files changed, 22 insertions(+)
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index d2b2c35..1187197 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -146,6 +146,7 @@ Aml *aml_io(AmlIODecode dec, uint16_t min_base, uint16_t
max_base,
uint8_t aln, uint8_t len);
Aml *aml_operation_region(const char *name, AmlRegionSpace rs,
uint32_t offset, uint32_t len);
+Aml *aml_irq_no_flags(uint8_t irq);
Aml *aml_named_field(const char *name, unsigned length);
Aml *aml_reserved_field(unsigned length);
Aml *aml_local(int num);
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index d793775..60245e7 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -514,6 +514,27 @@ Aml *aml_io(AmlIODecode dec, uint16_t min_base, uint16_t
max_base,
return var;
}
+/*
+ * ACPI 1.0b: 6.4.2.1.1 ASL Macro for IRQ Descriptor
+ *
+ * More verbose description at:
+ * ACPI 5.0: 19.5.64 IRQNoFlags (Interrupt Resource Descriptor Macro)
+ * 6.4.2.1 IRQ Descriptor
+ */
+Aml *aml_irq_no_flags(uint8_t irq)
+{
+ uint16_t irq_mask;
+ Aml *var = aml_alloc();
+
+ assert(irq < 16);
+ build_append_byte(var->buf, 0x22); /* IRQ descriptor 2 byte form */
+
+ irq_mask = 1U << irq;
+ build_append_byte(var->buf, irq_mask & 0xFF); /* IRQ mask bits[7:0] */
+ build_append_byte(var->buf, irq_mask >> 8); /* IRQ mask bits[15:8] */
+ return var;
+}
+
/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefLEqual */
Aml *aml_equal(Aml *arg1, Aml *arg2)
{
--
MST
- [Qemu-devel] [PULL v3 01/26] balloon: call qdev_alias_all_properties for proxy dev in balloon class init, (continued)
- [Qemu-devel] [PULL v3 01/26] balloon: call qdev_alias_all_properties for proxy dev in balloon class init, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 02/26] tpm: Extend sts register to 32 bit, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 04/26] tpm: Support for XFIFO register, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 03/26] tpm: Allow 32 & 16 bit accesses to the registers, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 05/26] tpm: Support for TIS selftest done flag, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 06/26] tpm: Support for capability flags of TIS 1.3, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 09/26] pc: acpi: drop manual hole punching for CPU hotplug resources, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 07/26] pc: acpi-build: create PCI0._CRS dynamically, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 08/26] pc: acpi: drop manual hole punching for PCI hotplug resources, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 10/26] pc: acpi: drop manual hole punching for GPE0 resources, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 12/26] acpi: add acpi_irq_no_flags() term,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v3 11/26] pc: acpi-build: drop remaining ssdt_misc template, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 13/26] pc: export applesmc IO port/len, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 14/26] pc: acpi-build: drop template patching and create Device(SMC) dynamically, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 15/26] tests: ACPI test blobs update due to PCI0._CRS changes, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 16/26] tests: bios-tables-test: add support for testing bridges, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 17/26] tests: add ACPI blobs for qemu with bridge cases, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 18/26] pc: acpi-build: simplify PCI bus tree generation, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 19/26] tests: ACPI: update pc/SSDT.bridge due to new alg of PCI tree creation, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 20/26] pc: acpi-build: drop template patching and create PCI bus tree dynamically, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 21/26] pc: acpi: remove not used anymore ssdt-[misc|pcihp].hex.generated blobs, Michael S. Tsirkin, 2015/03/02