summaryrefslogtreecommitdiffstats
path: root/sys/i386/include
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-05-04 20:39:24 +0000
committerjhb <jhb@FreeBSD.org>2004-05-04 20:39:24 +0000
commite077495344dba7e35611886ce89b689353105df3 (patch)
treee2391cfcc71a98bc1ca81786505453cee65d7289 /sys/i386/include
parent4bc7c8e3983b5add368722214c64a8920a220694 (diff)
downloadFreeBSD-src-e077495344dba7e35611886ce89b689353105df3.zip
FreeBSD-src-e077495344dba7e35611886ce89b689353105df3.tar.gz
- Change the APIC code to mostly use the recently added intr_trigger
and intr_polarity enums for passing around interrupt trigger modes and polarity rather than using the magic numbers 0 for level/low and 1 for edge/high. - Convert the mptable parsing code to use the new ELCR wrapper code rather than reading the ELCR directly. Also, use the ELCR settings to control both the trigger and polarity of EISA IRQs instead of just the trigger mode. - Rework the MADT's handling of the ACPI SCI again: - If no override entry for the SCI exists at all, use level/low trigger instead of the default edge/high used for ISA IRQs. - For the ACPI SCI, use level/low values for conforming trigger and polarity rather than the edge/high values we use for all other ISA IRQs. - Rework the tunables available to override the MADT. The hw.acpi.force_sci_lo tunable is no longer supported. Instead, there are now two tunables that can independently override the trigger mode and/or polarity of the SCI. The hw.acpi.sci.trigger tunable can be set to either "edge" or "level", and the hw.acpi.sci.polarity tunable can be set to either "high" or "low". To simulate hw.acpi.force_sci_lo, set hw.acpi.sci.trigger to "level" and hw.acpi.sci.polarity to "low". If you are having problems with ACPI either causing an interrupt storm or not working at all (e.g., the power button doesn't turn invoke a shutdown -p now), you can try tweaking these two tunables to find the combination that works.
Diffstat (limited to 'sys/i386/include')
-rw-r--r--sys/i386/include/apicvar.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/i386/include/apicvar.h b/sys/i386/include/apicvar.h
index 9d5cdff..f387969 100644
--- a/sys/i386/include/apicvar.h
+++ b/sys/i386/include/apicvar.h
@@ -142,8 +142,9 @@ void ioapic_register(void *cookie);
int ioapic_remap_vector(void *cookie, u_int pin, int vector);
int ioapic_set_extint(void *cookie, u_int pin);
int ioapic_set_nmi(void *cookie, u_int pin);
-int ioapic_set_polarity(void *cookie, u_int pin, char activehi);
-int ioapic_set_triggermode(void *cookie, u_int pin, char edgetrigger);
+int ioapic_set_polarity(void *cookie, u_int pin, enum intr_polarity pol);
+int ioapic_set_triggermode(void *cookie, u_int pin,
+ enum intr_trigger trigger);
int ioapic_set_smi(void *cookie, u_int pin);
void lapic_create(u_int apic_id, int boot_cpu);
void lapic_disable(void);
@@ -160,8 +161,10 @@ void lapic_handle_intr(struct intrframe frame);
void lapic_set_logical_id(u_int apic_id, u_int cluster, u_int cluster_id);
int lapic_set_lvt_mask(u_int apic_id, u_int lvt, u_char masked);
int lapic_set_lvt_mode(u_int apic_id, u_int lvt, u_int32_t mode);
-int lapic_set_lvt_polarity(u_int apic_id, u_int lvt, u_char activehi);
-int lapic_set_lvt_triggermode(u_int apic_id, u_int lvt, u_char edgetrigger);
+int lapic_set_lvt_polarity(u_int apic_id, u_int lvt,
+ enum intr_polarity pol);
+int lapic_set_lvt_triggermode(u_int apic_id, u_int lvt,
+ enum intr_trigger trigger);
void lapic_setup(void);
#endif /* !LOCORE */
OpenPOWER on IntegriCloud