5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 Desc: Interrupt core, part of kernel.resource
12 #include <asm/segments.h>
13 #include <asm/linkage.h>
14 #include <asm/ptrace.h>
16 /* interrupt control.. */
18 #define __sti() __asm__ __volatile__ ("sti": : :"memory")
19 #define __cli() __asm__ __volatile__ ("cli": : :"memory")
21 /*********************************************************************/
24 #define STR(x) __STR(x)
26 /*********************************************************************/
29 * This is standard macro used to save register frame on the supervisor
30 * stack. Supposes that orig_eax is saved already.
39 "movl $"STR(KERNEL_DS)",%edx\n\t" \
43 #define RESTORE_REGS \
58 Save/restore all registers. These macros are used mostly inside Switch
73 "movl $"STR(KERNEL_DS)",%edx \n\t"\
88 #define FIRST_EXT_VECTOR 0x20 /* This is exactly what Intel says about */
89 #define SYSTEM_VECTOR 0x80 /* Vector callable from user mode */
91 #define NR_IRQS 16 /* Use all XT-PIC interrupts */
95 * Structure used to describe interrupt controler. Sufficient to describe
96 * the low-level hardware
101 const char *ic_Name
; /* Controller name */
102 void (*ic_startup
)(unsigned int); /* All functions here! */
103 void (*ic_shutdown
)(unsigned int);
104 void (*ic_handle
)(unsigned int, struct pt_regs
*);
105 void (*ic_enable
)(unsigned int);
106 void (*ic_disable
)(unsigned int);
111 void (*is_handler
)(int, void *, struct pt_regs
*);
112 const char *is_name
; /* Server name */
113 void *is_UserData
; /* Will be class data or similar */
118 unsigned int id_status
; /* IRQ status. See below for details */
119 struct irqController
*id_handler
; /* how to do emable/disable */
120 struct irqServer
*id_server
; /* Server pointer */
121 unsigned int id_depth
; /* Disable depth for nested IRQs */
122 unsigned int id_count
; /* IRQ counter */
123 unsigned int id_unused
[3];
128 #define IRQ_INPROGRESS 1 /* Handler active - DO NOT enter */
129 #define IRQ_DISABLED 2 /* IRQ disabled - DO NOT enter */
130 #define IRQ_PENDING 4 /* IRQ pending - replay on enable */
131 #define IRQ_REPLAY 8 /* IRQ has been replayed but not acked yet */
132 #define IRQ_AUTODETECT 16 /* IRQ is beeing autodetected */
133 #define IRQ_WAITING 32 /* IRQ not seen yet - for autodetection */
135 #endif /* ASM_IRQ_H */