diff options
Diffstat (limited to 'i386')
-rw-r--r-- | i386/i386/ipl.h | 4 | ||||
-rw-r--r-- | i386/i386/pcb.c | 2 | ||||
-rw-r--r-- | i386/i386/pcb.h | 2 | ||||
-rw-r--r-- | i386/i386at/com.c | 2 | ||||
-rw-r--r-- | i386/i386at/conf.c | 48 | ||||
-rw-r--r-- | i386/i386at/ioapic.c | 6 | ||||
-rw-r--r-- | i386/i386at/kd.c | 41 | ||||
-rw-r--r-- | i386/i386at/kd_mouse.c | 2 | ||||
-rw-r--r-- | i386/i386at/kdsoft.h | 13 |
9 files changed, 57 insertions, 63 deletions
diff --git a/i386/i386/ipl.h b/i386/i386/ipl.h index fb939789..20e7428b 100644 --- a/i386/i386/ipl.h +++ b/i386/i386/ipl.h @@ -72,7 +72,9 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifdef KERNEL #ifndef __ASSEMBLER__ #include <machine/machspl.h> -extern void (*ivect[])(); +/* Note that interrupts have varying signatures */ +typedef void (*interrupt_handler_fn)(int); +extern interrupt_handler_fn ivect[]; extern int iunit[]; extern spl_t curr_ipl; #endif /* __ASSEMBLER__ */ diff --git a/i386/i386/pcb.c b/i386/i386/pcb.c index 5ac487b7..ef300537 100644 --- a/i386/i386/pcb.c +++ b/i386/i386/pcb.c @@ -332,7 +332,7 @@ void load_context(thread_t new) */ thread_t switch_context( thread_t old, - void (*continuation)(), + continuation_t continuation, thread_t new) { /* diff --git a/i386/i386/pcb.h b/i386/i386/pcb.h index 5bc78066..4d48b9f7 100644 --- a/i386/i386/pcb.h +++ b/i386/i386/pcb.h @@ -77,7 +77,7 @@ extern void update_ktss_iopb (unsigned char *new_iopb, io_port_t size); extern thread_t Load_context (thread_t new); -extern thread_t Switch_context (thread_t old, void (*continuation)(), thread_t new); +extern thread_t Switch_context (thread_t old, continuation_t continuation, thread_t new); extern void switch_to_shutdown_context(thread_t thread, void (*routine)(processor_t), diff --git a/i386/i386at/com.c b/i386/i386at/com.c index 8bd80206..c63c30a4 100644 --- a/i386/i386at/com.c +++ b/i386/i386at/com.c @@ -49,7 +49,7 @@ #include <device/cons.h> -static void comparam(); +static void comparam(int); static vm_offset_t com_std[NCOM] = { 0 }; struct bus_device *cominfo[NCOM]; diff --git a/i386/i386at/conf.c b/i386/i386at/conf.c index ca5d0dfb..ecbf1e45 100644 --- a/i386/i386at/conf.c +++ b/i386/i386at/conf.c @@ -86,76 +86,76 @@ struct dev_ops dev_name_list[] = indirect list */ { "cn", nulldev_open, nulldev_close, nulldev_read, nulldev_write, nulldev_getstat, nulldev_setstat, nomap, - nodev, nulldev, nulldev_portdeath, 0, - nodev }, + nodev_async_in, nulldev_reset, nulldev_portdeath, 0, + nodev_info}, #ifndef MACH_HYP #if ENABLE_IMMEDIATE_CONSOLE { "immc", nulldev_open, nulldev_close, nulldev_read, nulldev_write, nulldev_getstat, nulldev_setstat, - nomap, nodev, nulldev, nulldev_portdeath, 0, - nodev }, + nomap, nodev_async_in, nulldev_reset, nulldev_portdeath, 0, + nodev_info }, #endif /* ENABLE_IMMEDIATE_CONSOLE */ { kdname, kdopen, kdclose, kdread, kdwrite, kdgetstat, kdsetstat, kdmmap, - nodev, nulldev, kdportdeath, 0, - nodev }, + nodev_async_in, nulldev_reset, kdportdeath, 0, + nodev_info }, #endif /* MACH_HYP */ { timename, timeopen, timeclose, nulldev_read, nulldev_write, nulldev_getstat, nulldev_setstat, timemmap, - nodev, nulldev, nulldev_portdeath, 0, - nodev }, + nodev_async_in, nulldev_reset, nulldev_portdeath, 0, + nodev_info }, #ifndef MACH_HYP #if NCOM > 0 { comname, comopen, comclose, comread, comwrite, comgetstat, comsetstat, nomap, - nodev, nulldev, comportdeath, 0, - nodev }, + nodev_async_in, nulldev_reset, comportdeath, 0, + nodev_info }, #endif #ifdef MACH_LPR { lprname, lpropen, lprclose, lprread, lprwrite, lprgetstat, lprsetstat, nomap, - nodev, nulldev, lprportdeath, 0, - nodev }, + nodev_async_in, nulldev_reset, lprportdeath, 0, + nodev_info }, #endif { mousename, mouseopen, mouseclose, mouseread, nulldev_write, mousegetstat, nulldev_setstat, nomap, - nodev, nulldev, nulldev_portdeath, 0, - nodev }, + nodev_async_in, nulldev_reset, nulldev_portdeath, 0, + nodev_info }, { kbdname, kbdopen, kbdclose, kbdread, nulldev_write, kbdgetstat, kbdsetstat, nomap, - nodev, nulldev, nulldev_portdeath, 0, - nodev }, + nodev_async_in, nulldev_reset, nulldev_portdeath, 0, + nodev_info }, { memname, nulldev_open, nulldev_close, nulldev_read, nulldev_write, nulldev_getstat, nulldev_setstat, memmmap, - nodev, nulldev, nulldev_portdeath, 0, - nodev }, + nodev_async_in, nulldev_reset, nulldev_portdeath, 0, + nodev_info }, #endif /* MACH_HYP */ #ifdef MACH_KMSG { kmsgname, kmsgopen, kmsgclose, kmsgread, nulldev_write, kmsggetstat, nulldev_setstat, nomap, - nodev, nulldev, nulldev_portdeath, 0, - nodev }, + nodev_async_in, nulldev_reset, nulldev_portdeath, 0, + nodev_info }, #endif #ifdef MACH_HYP { hypcnname, hypcnopen, hypcnclose, hypcnread, hypcnwrite, hypcngetstat, hypcnsetstat, nomap, - nodev, nulldev, hypcnportdeath, 0, - nodev }, + nodev_async_in, nulldev_reset, hypcnportdeath, 0, + nodev_info }, #endif /* MACH_HYP */ { irqname, nulldev_open, nulldev_close, nulldev_read, nulldev_write,nulldev_getstat,nulldev_setstat, nomap, - nodev, nulldev, nulldev_portdeath,0, - nodev }, + nodev_async_in, nulldev_reset, nulldev_portdeath,0, + nodev_info }, }; int dev_name_count = sizeof(dev_name_list)/sizeof(dev_name_list[0]); diff --git a/i386/i386at/ioapic.c b/i386/i386at/ioapic.c index e5523488..3373aa71 100644 --- a/i386/i386at/ioapic.c +++ b/i386/i386at/ioapic.c @@ -43,7 +43,7 @@ spl_t curr_ipl; int iunit[NINTR] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}; -void (*ivect[NINTR])() = { +interrupt_handler_fn ivect[NINTR] = { /* 00 */ intnull, /* install timer later */ /* 01 */ kdintr, /* kdintr, ... */ /* 02 */ intnull, @@ -402,8 +402,8 @@ ioapic_configure(void) /* Install clock interrupt handler on both remapped timer pin and pin 0 * since nobody knows how all x86 timers are wired up */ - ivect[0] = hardclock; - ivect[timer_pin] = hardclock; + ivect[0] = (interrupt_handler_fn)hardclock; + ivect[timer_pin] = (interrupt_handler_fn)hardclock; printf("IOAPIC 0 configured\n"); } diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c index b5501873..5b932889 100644 --- a/i386/i386at/kd.c +++ b/i386/i386at/kd.c @@ -107,20 +107,24 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. struct tty kd_tty; extern boolean_t rebootflag; -static void charput(), charmvup(), charmvdown(), charclear(), charsetcursor(); +static void charput(csrpos_t pos, char ch, char chattr); +static void charmvup(csrpos_t from, csrpos_t to, int count); +static void charmvdown(csrpos_t from, csrpos_t to, int count); +static void charclear(csrpos_t to, int count, char chattr); +static void charsetcursor(csrpos_t newpos); static void kd_noopreset(void); /* * These routines define the interface to the device-specific layer. * See kdsoft.h for a more complete description of what each routine does. */ -void (*kd_dput)() = charput; /* put attributed char */ -void (*kd_dmvup)() = charmvup; /* block move up */ -void (*kd_dmvdown)() = charmvdown; /* block move down */ -void (*kd_dclear)() = charclear; /* block clear */ -void (*kd_dsetcursor)() = charsetcursor; +void (*kd_dput)(csrpos_t, char, char) = charput; /* put attributed char */ +void (*kd_dmvup)(csrpos_t, csrpos_t, int) = charmvup; /* block move up */ +void (*kd_dmvdown)(csrpos_t, csrpos_t, int) = charmvdown; /* block move down */ +void (*kd_dclear)(csrpos_t, int, char) = charclear; /* block clear */ +void (*kd_dsetcursor)(csrpos_t) = charsetcursor; /* set cursor position on displayed page */ -void (*kd_dreset)() = kd_noopreset; /* prepare for reboot */ +void (*kd_dreset)(void) = kd_noopreset; /* prepare for reboot */ /* * Globals used for both character-based controllers and bitmap-based @@ -2488,7 +2492,7 @@ int new_button = 0; void kd_xga_init(void) { - csrpos_t xga_getpos(); + csrpos_t xga_getpos(void); unsigned char start, stop; #if 0 @@ -2610,10 +2614,7 @@ xga_getpos(void) * Put attributed character for EGA/CGA/etc. */ static void -charput(pos, ch, chattr) -csrpos_t pos; /* where to put it */ -char ch; /* the character */ -char chattr; /* its attribute */ +charput(csrpos_t pos, char ch, char chattr) { *(vid_start + pos) = ch; *(vid_start + pos + 1) = chattr; @@ -2626,8 +2627,7 @@ char chattr; /* its attribute */ * Set hardware cursor position for EGA/CGA/etc. */ static void -charsetcursor(newpos) -csrpos_t newpos; +charsetcursor(csrpos_t newpos) { short curpos; /* position, not scaled for attribute byte */ @@ -2647,9 +2647,7 @@ csrpos_t newpos; * Block move up for EGA/CGA/etc. */ static void -charmvup(from, to, count) -csrpos_t from, to; -int count; +charmvup(csrpos_t from, csrpos_t to, int count) { kd_slmscu(vid_start+from, vid_start+to, count); } @@ -2661,9 +2659,7 @@ int count; * Block move down for EGA/CGA/etc. */ static void -charmvdown(from, to, count) -csrpos_t from, to; -int count; +charmvdown(csrpos_t from, csrpos_t to, int count) { kd_slmscd(vid_start+from, vid_start+to, count); } @@ -2675,10 +2671,7 @@ int count; * Fast clear for CGA/EGA/etc. */ static void -charclear(to, count, chattr) -csrpos_t to; -int count; -char chattr; +charclear(csrpos_t to, int count, char chattr) { kd_slmwd(vid_start+to, count, ((unsigned short)chattr<<8)+K_SPACE); } diff --git a/i386/i386at/kd_mouse.c b/i386/i386at/kd_mouse.c index 7dd1c272..3af21273 100644 --- a/i386/i386at/kd_mouse.c +++ b/i386/i386at/kd_mouse.c @@ -82,7 +82,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "kd_mouse.h" -static void (*oldvect)(); /* old interrupt vector */ +static interrupt_handler_fn oldvect; /* old interrupt vector */ static int oldunit; extern struct bus_device *cominfo[]; diff --git a/i386/i386at/kdsoft.h b/i386/i386at/kdsoft.h index 1dfd2b2c..79bfdb06 100644 --- a/i386/i386at/kdsoft.h +++ b/i386/i386at/kdsoft.h @@ -145,13 +145,12 @@ extern void bmpmvdown(csrpos_t, csrpos_t, int); extern void bmpclear(csrpos_t, int, char); extern void bmpsetcursor(csrpos_t); -extern void (*kd_dput)(); /* put attributed char */ -extern void (*kd_dmvup)(); /* block move up */ -extern void (*kd_dmvdown)(); /* block move down */ -extern void (*kd_dclear)(); /* block clear */ -extern void (*kd_dsetcursor)(); - /* set cursor position on displayed page */ -extern void (*kd_dreset)(); /* prepare for reboot */ +extern void (*kd_dput)(csrpos_t, char, char); /* put attributed char */ +extern void (*kd_dmvup)(csrpos_t, csrpos_t, int); /* block move up */ +extern void (*kd_dmvdown)(csrpos_t, csrpos_t, int); /* block move down */ +extern void (*kd_dclear)(csrpos_t, int, char); /* block clear */ +extern void (*kd_dsetcursor)(csrpos_t); /* set cursor position on displayed page */ +extern void (*kd_dreset)(void); /* prepare for reboot */ /* |