diff options
author | wollman <wollman@FreeBSD.org> | 1994-09-14 23:56:08 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1994-09-14 23:56:08 +0000 |
commit | 0d94d302f2ac05cf0c41867e9253f0a11aef7a49 (patch) | |
tree | 17ad9d8e626b038d1f53bc6c9132b2b6be410425 /sys/amd64 | |
parent | 7c99dec97adf4bfb630aa65087c53ea9b1b04e13 (diff) | |
download | FreeBSD-src-0d94d302f2ac05cf0c41867e9253f0a11aef7a49.zip FreeBSD-src-0d94d302f2ac05cf0c41867e9253f0a11aef7a49.tar.gz |
Beginnings of support for loadable protocol domains. In particular,
don't hard-code netisr values in icu.s, but rather, use an array of
function pointers and set them all up in machdep.c for statically-linked
protocol families. (This will eventually be done differently.)
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/machdep.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 480f00e..810db9c 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.60 1994/09/02 04:12:04 davidg Exp $ + * $Id: machdep.c,v 1.61 1994/09/04 19:59:14 pst Exp $ */ #include "npx.h" @@ -80,6 +80,8 @@ #include <sys/exec.h> #include <sys/vnode.h> +#include <net/netisr.h> + extern vm_offset_t avail_start, avail_end; #include <machine/cpu.h> @@ -164,6 +166,7 @@ cpu_startup() register caddr_t v; int maxbufs, base, residual; extern long Usrptsize; + extern void (*netisrs[32])(void); vm_offset_t minaddr, maxaddr; vm_size_t size = 0; int firstaddr; @@ -190,6 +193,25 @@ cpu_startup() printf("bad memory = %d (%d pages)\n", ptoa(badpages), badpages); /* + * Quickly wire in netisrs. + */ +#define DONET(isr, n) do { extern void isr(void); netisrs[n] = isr; } while(0) +#ifdef INET + DONET(arpintr, NETISR_ARP); + DONET(ipintr, NETISR_IP); +#endif +#ifdef NS + DONET(nsintr, NETISR_NS); +#endif +#ifdef ISO + DONET(clnlintr, NETISR_ISO); +#endif +#ifdef CCITT + DONET(ccittintr, NETISR_CCITT); +#endif +#undef DONET + + /* * Allocate space for system data structures. * The first available kernel virtual address is in "v". * As pages of kernel virtual memory are allocated, "v" is incremented. |