Define a generic PIC structure, used by the interrupt code.

This commit is contained in:
fvdl 2002-11-22 15:07:58 +00:00
parent 99dccacc3c
commit 88fb7f6d27
1 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,39 @@
/* $NetBSD: pic.h,v 1.1 2002/11/22 15:07:58 fvdl Exp $ */
#ifndef _I386_PIC_H
#define _I386_PIC_H
#include <sys/device.h>
#include <sys/lock.h>
struct cpu_info;
/*
* Structure common to all PIC softcs
*/
struct pic {
struct device pic_dev;
int pic_type;
__cpu_simple_lock_t pic_lock;
void (*pic_hwmask)(struct pic *, int);
void (*pic_hwunmask)(struct pic *, int);
void (*pic_addroute)(struct pic *, struct cpu_info *, int, int, int);
void (*pic_delroute)(struct pic *, struct cpu_info *, int, int, int);
struct intrstub *pic_level_stubs;
struct intrstub *pic_edge_stubs;
};
#define pic_name pic_dev.dv_xname
/*
* PIC types.
*/
#define PIC_I8259 0
#define PIC_IOAPIC 1
#define PIC_LAPIC 2
#define PIC_SOFT 3
extern struct pic i8259_pic;
extern struct pic local_pic;
extern struct pic softintr_pic;
#endif