diff options
author | bde <bde@FreeBSD.org> | 1998-08-11 15:08:13 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-08-11 15:08:13 +0000 |
commit | 577b83a70e2314aad91a8a8eb2701588bab8fd3a (patch) | |
tree | 0f2f845400de37f9f238c9632765a0ba01b2e2c0 /sys/i386/isa/ipl.s | |
parent | fd999b742a2a451bcfed8559f11c67a9cf60851e (diff) | |
download | FreeBSD-src-577b83a70e2314aad91a8a8eb2701588bab8fd3a.zip FreeBSD-src-577b83a70e2314aad91a8a8eb2701588bab8fd3a.tar.gz |
Implemented dynamic registration of software interrupt handlers. Not
used yet.
Use dummy SWI handlers to avoid some checks for null pointers.
Diffstat (limited to 'sys/i386/isa/ipl.s')
-rw-r--r-- | sys/i386/isa/ipl.s | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/sys/i386/isa/ipl.s b/sys/i386/isa/ipl.s index 55cb847..e6f4eb0 100644 --- a/sys/i386/isa/ipl.s +++ b/sys/i386/isa/ipl.s @@ -36,7 +36,7 @@ * * @(#)ipl.s * - * $Id: ipl.s,v 1.21 1998/03/23 19:52:59 jlemon Exp $ + * $Id: ipl.s,v 1.22 1998/07/27 16:51:33 jlemon Exp $ */ @@ -247,21 +247,12 @@ doreti_unpend: #endif /* SMP */ /* - * Setup JUMP to _Xresume0 thru _Xresume23 for HWIs, - * or - * Setup CALL of swi_tty, swi_net, _softclock, swi_ast for SWIs. + * Set up JUMP to _ihandlers[%ecx] for HWIs. + * Set up CALL of _ihandlers[%ecx] for SWIs. + * This is a bit early for the SMP case - we have to push %ecx and + * %edx, but could push only %ecx and load %edx later. */ - movl ihandlers(,%ecx,4),%edx - testl %edx,%edx -#if 0 - /* XXX SMP this would leave cil set: */ - je doreti_next /* "can't happen" */ -#else - jne 1f - int $3 /* _breakpoint */ - jmp doreti_next /* "can't happen" */ -1: -#endif + movl _ihandlers(,%ecx,4),%edx cmpl $NHWI,%ecx jae doreti_swi cli @@ -323,6 +314,7 @@ doreti_swi: */ #ifdef SMP orl imasks(,%ecx,4), %eax + pushl %ecx /* preserve for use by _swi_generic */ pushl %edx /* save handler entry point */ cli /* prevent INT deadlock */ pushl %eax /* save cpl|cml */ @@ -335,6 +327,7 @@ doreti_swi: FAST_ICPL_UNLOCK sti popl %edx /* restore handler entry point */ + popl %ecx #else orl imasks(,%ecx,4),%eax movl %eax,_cpl @@ -418,8 +411,8 @@ dummycamisr: ret /* - * XXX there should be a registration function to put the handler for the - * attached driver directly in ihandlers. Then this function will go away. + * This function will go away soon when register_swi() is used to register + * the poll functions. */ ALIGN_TEXT swi_tty: @@ -439,6 +432,22 @@ swi_tty: ret #endif +/* + * The arg is in a nonstandard place, so swi_dispatcher() can't be called + * directly and swi_generic() can't use ENTRY() or MCOUNT. + */ + ALIGN_TEXT + .globl _swi_generic +_swi_generic: + pushl %ecx + FAKE_MCOUNT(4(%esp)) + call _swi_dispatcher + popl %ecx + ret + +ENTRY(swi_null) + ret + #ifdef APIC_IO #include "i386/isa/apic_ipl.s" #else |