diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2004-01-28 01:39:41 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2004-01-28 01:39:41 +0000 |
commit | eb2015b73fc7e8f74be0338c16e873a01653fe03 (patch) | |
tree | a0a1beaa9bc6601b949ea8937d79f939833b3cd3 /sys/arch/amd64/include/pic.h | |
parent | fc744b6d0908de21ef8f71c7e15dd3b113e9aad8 (diff) |
an amd64 arch support.
hacked by art@ from netbsd sources and then later debugged
by me into the shape where it can host itself.
no bootloader yet as needs redoing from the
recent advanced i386 sources (anyone? ;)
Diffstat (limited to 'sys/arch/amd64/include/pic.h')
-rw-r--r-- | sys/arch/amd64/include/pic.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/sys/arch/amd64/include/pic.h b/sys/arch/amd64/include/pic.h new file mode 100644 index 00000000000..c9d9a5082a6 --- /dev/null +++ b/sys/arch/amd64/include/pic.h @@ -0,0 +1,40 @@ +/* $OpenBSD: pic.h,v 1.1 2004/01/28 01:39:39 mickey Exp $ */ +/* $NetBSD: pic.h,v 1.1 2003/02/26 21:26:11 fvdl Exp $ */ + +#ifndef _X86_PIC_H +#define _X86_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; + 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 |