Date: Thu, 15 Feb 2001 18:50:27 +0530 (IST) From: Satyajeet Seth <sseth@sasken.com> To: Mike Smith <msmith@freebsd.org> Cc: <freebsd-net@freebsd.org>, <hackers@freebsd.org> Subject: Re: KLD'fying PCI device driver! Message-ID: <Pine.GSO.4.30.0102151550130.632-100000@suns3.sasi.com> In-Reply-To: <200102151014.f1FAEbV09259@mass.dis.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Please see my comments below: On Thu, 15 Feb 2001, Mike Smith wrote: > > 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? > > Too many. You haven't really given anything like enough detail here. > > - What FreeBSD version? Satya-> 4.0 > - Build the kernel with DDB and symbols, and show us the backtrace. Satya-> The trace is given below: (kgdb) where #0 0xc018cf3c in boot () #1 0xc018d2d9 in panic () #2 0xc0137c39 in db_panic () #3 0xc0137bd9 in db_command () #4 0xc0137c9e in db_command_loop () #5 0xc0139daf in db_trap () #6 0xc02c229d in kdb_trap () #7 0xc02d14b4 in trap_fatal () #8 0xc02d118d in trap_pfault () #9 0xc02d0cd3 in trap () #10 0xc01909a4 in sysctl_register_oid () #11 0xc0190a51 in sysctl_register_set () #12 0xc017f5d3 in linker_file_register_sysctls () #13 0xc017f670 in linker_load_file () #14 0xc017feae in kldload () #15 0xc02d1712 in syscall () #16 0xc02c2ba6 in Xint0x80_syscall () #17 0x80480f9 in ?? () > - Your hardware init function may not work properly in the case where > the system is already up and running (eg. you may be generating > interrupts before you are ready to handle them). > - You may be building against sources that don't match your running > kernel. Satya-> The driver works properly when statically linked. Thanks Satya To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.30.0102151550130.632-100000>