From owner-freebsd-hackers Thu Jan 11 21:49:42 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from pcs113.sasi.com (samar.sasken.com [164.164.56.2]) by hub.freebsd.org (Postfix) with ESMTP id 2B38837B401 for ; Thu, 11 Jan 2001 21:49:19 -0800 (PST) Received: from localhost (pmk@localhost) by pcs113.sasi.com (8.9.3/8.9.3) with ESMTP id LAA01879; Fri, 12 Jan 2001 11:18:53 +0530 X-Authentication-Warning: pcs113.sasi.com: pmk owned process doing -bs Date: Fri, 12 Jan 2001 11:18:53 +0530 (IST) From: Mohana Krishna Penumetcha To: Julian Elischer Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: kernel debugging!!! In-Reply-To: <3A5DCFE0.D52CD8E6@elischer.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 11 Jan 2001, Julian Elischer wrote: > 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). that means this idle stack is used during boot up time. and what will kernel do when there is no curproc i.e. all processes are in sleep/waitng for some event?? can you give me some pointers?? BTW, i need some pointers about how to use the information given by DDB, basically instruction,stack, base pointers, registers etc. in our case DDB is n't showing any stack trace. it is printing a stack trace which either starts from one on its internal routines or from trap. thanks, mohan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message