summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMyles Watson <mylesgw@gmail.com>2009-10-16 14:34:50 +0000
committerMyles Watson <mylesgw@gmail.com>2009-10-16 14:34:50 +0000
commit9969bdc4fb3d36a39ed9efb67ef0bf638a4e8e09 (patch)
treebd4d0945753bda13729db6f38a9246890a12531e
parent025b8a387720d7766774256aad9ae1dabfa28ec1 (diff)
Fix IRQ9 and allow ACPI without an MP table for Tyan s289x.
Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4787 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r--src/mainboard/tyan/s2891/acpi_tables.c18
-rw-r--r--src/mainboard/tyan/s2892/acpi_tables.c18
-rw-r--r--src/mainboard/tyan/s2895/acpi_tables.c32
3 files changed, 62 insertions, 6 deletions
diff --git a/src/mainboard/tyan/s2891/acpi_tables.c b/src/mainboard/tyan/s2891/acpi_tables.c
index 07d46be0db..895a629911 100644
--- a/src/mainboard/tyan/s2891/acpi_tables.c
+++ b/src/mainboard/tyan/s2891/acpi_tables.c
@@ -42,6 +42,20 @@ unsigned long acpi_fill_madt(unsigned long current)
apic_addr = pci_read_config32(dev, PCI_BASE_ADDRESS_1) & ~0xf;
current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, 4,
apic_addr, 0);
+ /* Initialize interrupt mapping if mptable.c didn't. */
+ #if (!CONFIG_GENERATE_MP_TABLE)
+ {
+ u32 dword;
+ dword = 0x0120d218;
+ pci_write_config32(dev, 0x7c, dword);
+
+ dword = 0x12008a00;
+ pci_write_config32(dev, 0x80, dword);
+
+ dword = 0x0000007d;
+ pci_write_config32(dev, 0x84, dword);
+ }
+ #endif
}
/* Write AMD 8131 two IOAPICs. */
@@ -59,9 +73,9 @@ unsigned long acpi_fill_madt(unsigned long current)
apic_addr, 0x1C);
}
- /* IRQ9 ACPI active low. */
+ /* IRQ9 */
current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *)
- current, 0, 9, 9, MP_IRQ_TRIGGER_LEVEL | MP_IRQ_POLARITY_LOW);
+ current, 0, 9, 9, MP_IRQ_TRIGGER_EDGE | MP_IRQ_POLARITY_LOW);
/* 0: mean bus 0--->ISA */
/* 0: PIC 0 */
diff --git a/src/mainboard/tyan/s2892/acpi_tables.c b/src/mainboard/tyan/s2892/acpi_tables.c
index 07d46be0db..895a629911 100644
--- a/src/mainboard/tyan/s2892/acpi_tables.c
+++ b/src/mainboard/tyan/s2892/acpi_tables.c
@@ -42,6 +42,20 @@ unsigned long acpi_fill_madt(unsigned long current)
apic_addr = pci_read_config32(dev, PCI_BASE_ADDRESS_1) & ~0xf;
current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, 4,
apic_addr, 0);
+ /* Initialize interrupt mapping if mptable.c didn't. */
+ #if (!CONFIG_GENERATE_MP_TABLE)
+ {
+ u32 dword;
+ dword = 0x0120d218;
+ pci_write_config32(dev, 0x7c, dword);
+
+ dword = 0x12008a00;
+ pci_write_config32(dev, 0x80, dword);
+
+ dword = 0x0000007d;
+ pci_write_config32(dev, 0x84, dword);
+ }
+ #endif
}
/* Write AMD 8131 two IOAPICs. */
@@ -59,9 +73,9 @@ unsigned long acpi_fill_madt(unsigned long current)
apic_addr, 0x1C);
}
- /* IRQ9 ACPI active low. */
+ /* IRQ9 */
current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *)
- current, 0, 9, 9, MP_IRQ_TRIGGER_LEVEL | MP_IRQ_POLARITY_LOW);
+ current, 0, 9, 9, MP_IRQ_TRIGGER_EDGE | MP_IRQ_POLARITY_LOW);
/* 0: mean bus 0--->ISA */
/* 0: PIC 0 */
diff --git a/src/mainboard/tyan/s2895/acpi_tables.c b/src/mainboard/tyan/s2895/acpi_tables.c
index 43a80b6d5a..525a959fad 100644
--- a/src/mainboard/tyan/s2895/acpi_tables.c
+++ b/src/mainboard/tyan/s2895/acpi_tables.c
@@ -42,6 +42,20 @@ unsigned long acpi_fill_madt(unsigned long current)
apic_addr = pci_read_config32(dev, PCI_BASE_ADDRESS_1) & ~0xf;
current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, 4,
apic_addr, 0);
+ /* Initialize interrupt mapping if mptable.c didn't. */
+ #if (!CONFIG_GENERATE_MP_TABLE)
+ {
+ u32 dword;
+ dword = 0x0120d218;
+ pci_write_config32(dev, 0x7c, dword);
+
+ dword = 0x12008a00;
+ pci_write_config32(dev, 0x80, dword);
+
+ dword = 0x00080d7d;
+ pci_write_config32(dev, 0x84, dword);
+ }
+ #endif
}
/* Write AMD 8131 two IOAPICs. */
@@ -65,11 +79,25 @@ unsigned long acpi_fill_madt(unsigned long current)
apic_addr = pci_read_config32(dev, PCI_BASE_ADDRESS_1) & ~0xf;
current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, 7,
apic_addr, 0x20);
+ /* Initialize interrupt mapping if mptable.c didn't. */
+ #if (!CONFIG_GENERATE_MP_TABLE)
+ {
+ u32 dword;
+ dword = 0x0000d218; // Why does the factory BIOS have 0?
+ pci_write_config32(dev, 0x7c, dword);
+
+ dword = 0x00000000;
+ pci_write_config32(dev, 0x80, dword);
+
+ dword = 0x00000d00; // Same here.
+ pci_write_config32(dev, 0x84, dword);
+ }
+ #endif
}
- /* IRQ9 ACPI active low. */
+ /* IRQ9 */
current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *)
- current, 0, 9, 9, MP_IRQ_TRIGGER_LEVEL | MP_IRQ_POLARITY_LOW);
+ current, 0, 9, 9, MP_IRQ_TRIGGER_EDGE | MP_IRQ_POLARITY_LOW);
/* IRQ0 -> APIC IRQ2. */
/* Doesn't work on this board. */