Date: Mon, 21 May 2001 18:03:11 +0800 From: =?gb2312?B?WWluZy5zdW4gW4xP+pdd?= <Ying.sun@mic.com.tw> To: "'questions@FreeBSD.org'" <questions@FreeBSD.org> Subject: about kld Message-ID: <7B59A702921AD411A50A00D0B72029E40441F4@MRSPDC>
next in thread | raw e-mail | index | archive | help
hi: i copy a module file as fallow: #include <sys/types.h> #include <sys/module.h> #include <sys/systm.h> /* uprintf */ #include <sys/errno.h> #include <sys/param.h> /* defines used in kernel.h */ #include <sys/kernel.h> /* types used in module initialization */ /* * Load handler that deals with the loading and unloading of a KLD. */ static int skel_loader(struct module *m, int what, void *arg) { int err = 0; switch (what) { case MOD_LOAD: /* kldload */ uprintf("Skeleton KLD loaded.\n"); break; case MOD_UNLOAD: uprintf("Skeleton KLD unloaded.\n"); break; default: err = EINVAL; break; } return(err); } /* Declare this module to the rest of the kernel */ DECLARE_MODULE(skeleton, skel_loader, SI_SUB_KLD, SI_ORDER_ANY); Makefile as fallow: SRCS=skeleton.c KMOD=skeleton .include <bsd.kmod.mk> but when i exeute : kldload -v ./skeleton.ko it is error,the error message as fallow: Fatal trap 12:page fault while in kernel mode fault virtual address =0x83e58955 fault code = suppervisor read,page not present instruction pointer = 0x8:0xc02b8af8 stack pointer = 0x10:0xc95b6e98 frame pointer = 0x1:0xc95b6e98 code segment = base 0x0 limit 0xfffff ,type 0x1b = DPL 0 ,pres 1,def32 1,gran 1 process eflags = interrupt enabled ,resume,IOPL = 0 current process = 8346(kldload) interrupt mask = none trap number = 12 panic :page default please tell why ,and how resolve it by the way the version of the freebsd is 4.3 the best regard To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7B59A702921AD411A50A00D0B72029E40441F4>