diff options
author | jhb <jhb@FreeBSD.org> | 2003-12-03 21:12:09 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-12-03 21:12:09 +0000 |
commit | f218c9a3f0f372ac11145cb60dd763a41e624fb8 (patch) | |
tree | 64b189f69ac389f4a7eca88728916b9a03a909f9 /sys/i386 | |
parent | af58c0d9f3d74333f1472856f640c2e47641fe3d (diff) | |
download | FreeBSD-src-f218c9a3f0f372ac11145cb60dd763a41e624fb8.zip FreeBSD-src-f218c9a3f0f372ac11145cb60dd763a41e624fb8.tar.gz |
- Remove the hack to prevent the acpi module from loading.
- Add a really, really, nasty hack to provide stub versions of all of
the 'device apic' functions used by the ACPI MADT APIC enumerator if
'device apic' is not compiled into the kernel. This is gross but is
the best we can do with the current kernel linker implementation.
Approved by: re (scottl / blanket)
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/machdep.c | 98 |
1 files changed, 95 insertions, 3 deletions
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index ff608d9..755eef4 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -40,7 +40,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include "opt_acpi.h" +#include "opt_apic.h" #include "opt_atalk.h" #include "opt_compat.h" #include "opt_cpu.h" @@ -2751,8 +2751,100 @@ Debugger(const char *msg) } #endif /* no DDB */ -#ifndef DEV_ACPI -MODULE_VERSION(acpi, 1); +#ifndef DEV_APIC +#include <machine/apicvar.h> + +/* + * Provide stub functions so that the MADT APIC enumerator in the acpi + * kernel module will link against a kernel without 'device apic'. + * + * XXX - This is a gross hack. + */ +void +apic_register_enumerator(struct apic_enumerator *enumerator) +{ +} + +void * +ioapic_create(uintptr_t addr, int32_t id, int intbase) +{ + return (NULL); +} + +int +ioapic_disable_pin(void *cookie, u_int pin) +{ + return (ENXIO); +} + +int +ioapic_get_vector(void *cookie, u_int pin) +{ + return (-1); +} + +void +ioapic_register(void *cookie) +{ +} + +int +ioapic_remap_vector(void *cookie, u_int pin, int vector) +{ + return (ENXIO); +} + +int +ioapic_set_extint(void *cookie, u_int pin) +{ + return (ENXIO); +} + +int +ioapic_set_nmi(void *cookie, u_int pin) +{ + return (ENXIO); +} + +int +ioapic_set_polarity(void *cookie, u_int pin, char activehi) +{ + return (ENXIO); +} + +int +ioapic_set_triggermode(void *cookie, u_int pin, char edgetrigger) +{ + return (ENXIO); +} + +void +lapic_create(u_int apic_id, int boot_cpu) +{ +} + +void +lapic_init(uintptr_t addr) +{ +} + +int +lapic_set_lvt_mode(u_int apic_id, u_int lvt, u_int32_t mode) +{ + return (ENXIO); +} + +int +lapic_set_lvt_polarity(u_int apic_id, u_int lvt, u_char activehi) +{ + return (ENXIO); +} + +int +lapic_set_lvt_triggermode(u_int apic_id, u_int lvt, u_char edgetrigger) +{ + return (ENXIO); +} #endif #ifdef DDB |