[coreboot-gerrit] Patch set updated for coreboot: e7b1db7 acpigen: Add acpigen_write_irq.
Vladimir Serbinenko (phcoder@gmail.com)
gerrit at coreboot.org
Sun Feb 16 01:06:06 CET 2014
Vladimir Serbinenko (phcoder at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5241
-gerrit
commit e7b1db7a11b64719058e88878f39971d4976b87e
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date: Sat Feb 15 18:57:17 2014 +0100
acpigen: Add acpigen_write_irq.
Change-Id: Iba52dc2d52b7ac9a65d1d17b43e7204f5ede373e
Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
---
src/arch/x86/boot/acpigen.c | 15 +++++++++++++++
src/arch/x86/include/arch/acpigen.h | 1 +
2 files changed, 16 insertions(+)
diff --git a/src/arch/x86/boot/acpigen.c b/src/arch/x86/boot/acpigen.c
index affc1b8..b203288 100644
--- a/src/arch/x86/boot/acpigen.c
+++ b/src/arch/x86/boot/acpigen.c
@@ -623,6 +623,21 @@ int acpigen_write_register(acpi_addr_t *addr)
return 15;
}
+int acpigen_write_irq(u16 mask)
+{
+ /*
+ * acpi 4.0 section 6.4.2.6: I/O Port Descriptor
+ * Byte 0:
+ * Bit7 : 0 => small item
+ * Bit6-3: 0100 (0x4) => IRQ port descriptor
+ * Bit2-0: 010 (0x2) => 2 Bytes long
+ */
+ acpigen_emit_byte(0x22);
+ acpigen_emit_byte(mask & 0xff);
+ acpigen_emit_byte((mask >> 8) & 0xff);
+ return 3;
+}
+
int acpigen_write_io16(u16 min, u16 max, u8 align, u8 len, u8 decode16)
{
/*
diff --git a/src/arch/x86/include/arch/acpigen.h b/src/arch/x86/include/arch/acpigen.h
index 9257903..0fe5ebd 100644
--- a/src/arch/x86/include/arch/acpigen.h
+++ b/src/arch/x86/include/arch/acpigen.h
@@ -63,6 +63,7 @@ int acpigen_write_resourcetemplate_footer(int len);
int acpigen_write_mainboard_resource_template(void);
int acpigen_write_mainboard_resources(const char *scope, const char *name);
int acpigen_emit_eisaid(const char *eisaid);
+int acpigen_write_irq(u16 mask);
int get_cst_entries(acpi_cstate_t **);
More information about the coreboot-gerrit
mailing list