From owner-freebsd-hackers Thu Feb 15 7:33: 5 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from syncopation-01.iinet.net.au (syncopation-01.iinet.net.au [203.59.24.37]) by hub.freebsd.org (Postfix) with SMTP id 8AB5C37B491 for ; Thu, 15 Feb 2001 07:32:57 -0800 (PST) Received: (qmail 28878 invoked by uid 666); 15 Feb 2001 15:45:10 -0000 Received: from i076-013.nv.iinet.net.au (HELO elischer.org) (203.59.76.13) by mail.m.iinet.net.au with SMTP; 15 Feb 2001 15:45:10 -0000 Message-ID: <3A8BF697.DE9D4C72@elischer.org> Date: Thu, 15 Feb 2001 07:32:39 -0800 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Satyajeet Seth Cc: "Andrew R. Reiter" , freebsd-net@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: KLD'fying PCI device driver! References: Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Satyajeet Seth wrote: > > Hi > > > Could you send the load handler function src? > > My code does not contain a load handler function. > > I did not add a load handler function, because none of the files in > /sys/pci directory like if_fxp.c, if_vr.c seemed to contain contain a load > handler function. > To the best of my knowledge, all the pci device driver modules use the > function pci_modevent() in /sys/pci/pci.c > > > > I am trying to convert my PCI device driver into a KLD. > > > > > > So far I have done the following: > > > 1. Built the kernel without the static linked device driver. > > > 2. Added entries to Makefiles in /sys/modules and /sys/modules/xxx. > > > 3. Did "make all install" in /sys/modules directory. > > > 4. Tried loading the KLD. I got the following error: > > > "Fatal trap 12: page fault while in kernel mode" > > > > > > Any ideas as to what could be going wrong? Assuming -current. (if 4.2, start with the one from -current) start with /usr/share/examples/drivers/make_device_driver.sh it at least compiles and loads. modify it to include your code.. > > Thanks > Satya > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000-2001 ---> X_.---._/ v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message