Return to BSD News archive
Newsgroups: comp.unix.bsd.freebsd.misc Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!paladin.american.edu!zombie.ncsc.mil!news.mathworks.com!newsfeed.internetmci.com!nntp-hub2.barrnet.net!news.Stanford.EDU!microunity!usenet From: deborah@velara.microunity.com (Deborah Gronke Bennett) Subject: Re: Device Driver questions In-Reply-To: carlson@olympus.bzn.vlt.eds.com's message of 9 Jan 1996 13:55:46 -0700 Message-ID: <oqka2reojt.fsf@velara.microunity.com> Sender: deborah@velara.microunity.com Organization: MicroUnity Systems Engineering, Inc. X-Newsreader: Gnus v5.1 References: <4cukoi$1cbl@olympus.bzn.vlt.eds.com> Date: Tue, 16 Jan 1996 22:56:54 GMT Lines: 22 In article <4cukoi$1cbl@olympus.bzn.vlt.eds.com> carlson@olympus.bzn.vlt.eds.com (Brent Carlson) writes: I'm writing a FreeBSD device driver. The driver seems to work fine most of the time. I have a couple questions: 2) I have a number of printf statements in my device driver. These are only needed for debugging and generally do not execute (due to ifdefs). However, I've noticed when I do turn the printf's on, often the system will crash with a page fault while in kernel mode (fatal trap 12). Is this due to the printf? What's causing the page fault? I've never had the PC crash when the printf's are turned off. Are you trying to use printf while in interrupt mode? This won't work - use the kernel log() function instead for better results. -- ---------- Deborah Gronke Bennett (WD5HJH) kernel and device drivers engineer deborah@microunity.com (408)-734-8100 MicroUnity Systems Eng., 255 Caspian Drive, Sunnyvale, CA 94089-1015 USA