* Move the legacy PIC and the IO-APIC code into their own source file. No
functional change intended. * Use an appropriately sized sLevelTriggeredInterrupts for each controller type. This also fixes an out of bound access for IO-APICs with more than 32 entries and also returns the right mode in such cases. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41426 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -57,4 +57,17 @@ arch_int_are_interrupts_enabled_inline(void)
|
||||
arch_int_are_interrupts_enabled_inline()
|
||||
|
||||
|
||||
typedef struct interrupt_controller_s {
|
||||
const char *name;
|
||||
void (*enable_io_interrupt)(int32 num);
|
||||
void (*disable_io_interrupt)(int32 num);
|
||||
void (*configure_io_interrupt)(int32 num, uint32 config);
|
||||
bool (*is_spurious_interrupt)(int32 num);
|
||||
bool (*is_level_triggered_interrupt)(int32 num);
|
||||
bool (*end_of_interrupt)(int32 num);
|
||||
} interrupt_controller;
|
||||
|
||||
|
||||
void arch_int_set_interrupt_controller(const interrupt_controller &controller);
|
||||
|
||||
#endif /* _KERNEL_ARCH_x86_INT_H */
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Copyright 2011, Michael Lotz, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _KERNEL_ARCH_x86_IOAPIC_H
|
||||
#define _KERNEL_ARCH_x86_IOAPIC_H
|
||||
|
||||
struct kernel_args;
|
||||
|
||||
void ioapic_map(kernel_args* args);
|
||||
void ioapic_init(kernel_args* args);
|
||||
|
||||
#endif // _KERNEL_ARCH_x86_IOAPIC_H
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* Copyright 2011, Michael Lotz, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _KERNEL_ARCH_x86_PIC_H
|
||||
#define _KERNEL_ARCH_x86_PIC_H
|
||||
|
||||
void pic_init();
|
||||
void pic_disable();
|
||||
|
||||
#endif // _KERNEL_ARCH_x86_PIC_H
|
||||
Reference in New Issue
Block a user