From owner-freebsd-hackers Thu Jan 11 7:55:34 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.interware.hu (mail.interware.hu [195.70.32.130]) by hub.freebsd.org (Postfix) with ESMTP id 41FCB37B401 for ; Thu, 11 Jan 2001 07:55:11 -0800 (PST) Received: from luanda-56.budapest.interware.hu ([195.70.51.56] helo=elischer.org) by mail.interware.hu with esmtp (Exim 3.16 #1 (Debian)) id 14Gk4C-0005vA-00; Thu, 11 Jan 2001 16:55:09 +0100 Message-ID: <3A5DCFE0.D52CD8E6@elischer.org> Date: Thu, 11 Jan 2001 07:23:12 -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: Mohana Krishna Penumetcha Cc: Alfred Perlstein , freebsd-hackers@FreeBSD.ORG Subject: Re: kernel debugging!!! 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 Mohana Krishna Penumetcha wrote: > > > * Mohana Krishna Penumetcha [010111 03:08] wrote: > > > > > > > > > > Afaik, on i386 you have ~4k of kernel stack, however you have to > > > > realize that driver entry can come from an interrupt generated when > > > > the stack is already nearly exhausted. I'm not really that much > > > > of a driver programmer, but I've heard of people facing this problem > > > > before, solutions varied, but since each driver instance is single > > > > threaded you can pre-allocate via malloc (i think) the space you > > > > need and attach it to the per-driver data structure (softc afaik). > > > > > > i am confused between the kernel stack in kernel space (where ISRs > > > are called) and kernel stack each process has. the UPAGES constant > > > defines the size of process kernel stack. does it define kernel stack in > > > kernel space also?? (fig 3.1, page 51, BSD book) > > > > > > BTW, memory for softc is allocated from the heap in newbus > > > architecture. > > > > I'm pretty sure interrupts are piggybacked on the user-kernel-stack. > > > > this is o.k. when the system is up and running. but what about > boot-up time when there is no process, is there any stack meant for > this? There is always a stack for you..(there is an idle stack for just this case). The example driver in -current (not the one in 4.x) might be if interest to you. http://www.freebsd.org/cgi/cvsweb.cgi/src/share/examples/drivers/make_device_driver.sh (beware that that may have been wrapped by my mailer on tranmit.) > > > How about trying the simple printf idea and letting us know if > that > works? > > panic is coming in the middle of the routine. i am printing many > messages before the panic. > > -- > mohan > > 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 ---> X_.---._/ from Perth, presently in: Budapest v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message