00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00035 #ifndef __IRQ_H__
00036 #define __IRQ_H__
00037
00039 #define IRQ_MAX_PROG_SIZE 10
00040
00042 #define IPC_IRQ_RESERVED_VIRTUAL 10
00043
00044 #define IPC_IRQ_KLOG (-1)
00045 #define IPC_IRQ_KBDRESTART (-2)
00046
00047 typedef enum {
00048 CMD_MEM_READ_1 = 0,
00049 CMD_MEM_READ_2,
00050 CMD_MEM_READ_4,
00051 CMD_MEM_READ_8,
00052 CMD_MEM_WRITE_1,
00053 CMD_MEM_WRITE_2,
00054 CMD_MEM_WRITE_4,
00055 CMD_MEM_WRITE_8,
00056 CMD_PORT_READ_1,
00057 CMD_PORT_WRITE_1,
00058 CMD_IA64_GETCHAR,
00059 CMD_PPC32_GETCHAR,
00060 CMD_LAST
00061 } irq_cmd_type;
00062
00063 typedef struct {
00064 irq_cmd_type cmd;
00065 void *addr;
00066 unsigned long long value;
00067 int dstarg;
00068 } irq_cmd_t;
00069
00070 typedef struct {
00071 unsigned int cmdcount;
00072 irq_cmd_t *cmds;
00073 } irq_code_t;
00074
00075 #ifdef KERNEL
00076
00077 #include <ipc/ipc.h>
00078
00079 extern void ipc_irq_make_table(int irqcount);
00080 extern int ipc_irq_register(answerbox_t *box, int irq, irq_code_t *ucode);
00081 extern void ipc_irq_send_notif(int irq);
00082 extern void ipc_irq_send_msg(int irq, __native a1, __native a2, __native a3);
00083 extern void ipc_irq_unregister(answerbox_t *box, int irq);
00084 extern void irq_ipc_bind_arch(__native irq);
00085 extern void ipc_irq_cleanup(answerbox_t *box);
00086
00087 #endif
00088
00089 #endif
00090