From owner-freebsd-questions Mon May 21 14: 3: 3 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mr1.mic.com.tw (mr1.mic.com.tw [203.66.161.8]) by hub.freebsd.org (Postfix) with ESMTP id 5B19B37B422 for ; Mon, 21 May 2001 14:02:58 -0700 (PDT) (envelope-from Ying.sun@mic.com.tw) Received: from gw5.mic.com.tw (gw5.mic.com.tw [10.88.0.17]) by mr1.mic.com.tw (8.9.3+Sun/8.9.1) with ESMTP id FAA29565 for ; Tue, 22 May 2001 05:02:23 +0800 (CST) Received: by gw4.mic.com.tw with Internet Mail Service (5.5.2650.21) id ; Tue, 22 May 2001 05:02:50 +0800 Message-ID: <7B59A702921AD411A50A00D0B72029E40441F4@MRSPDC> From: =?gb2312?B?WWluZy5zdW4gW4xP+pdd?= To: "'questions@FreeBSD.org'" Subject: about kld Date: Mon, 21 May 2001 18:03:11 +0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="gb2312" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG hi: i copy a module file as fallow: #include #include #include /* uprintf */ #include #include /* defines used in kernel.h */ #include /* 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 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