From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Tameen Khan <tameen@cisco.com>
Cc: "'linuxppc-dev list'" <linuxppc-dev@lists.linuxppc.org>
Subject: Re: stack frame for interrupts/exceptions in PPC
Date: Wed, 28 Apr 2004 12:07:16 +1000 [thread overview]
Message-ID: <1083118036.20092.30.camel@gaston> (raw)
In-Reply-To: <006001c42cbd$b07e12f0$273147ab@amer.cisco.com>
On Wed, 2004-04-28 at 11:11, Tameen Khan wrote:
> I am tryting to implement kernel backtracing for PPC.
What do you mean ? There is already working backtrace code in the
kernel, both in the Oops code and in xmon.
> I need to understand how the process kernel stack/interrupt stack is managed
> for PPC in the event of interrupts and exceptions.
> ANY pointer to docs/code etc explaining above topic will be appreciated.
Look at xmon code :) You can find the docs for the ppc32 strackframe in
the SysV ABI or the LSB (Linux Standard Base). You can also look at
gcc's rs6000.{c,h}, there are some nice ascii art in there.
> What is STACK_FRAME_OVERHEAD_PPC used for??? Its defined to be 16 for PPC
> and 112 for PPC64.
It's the location of the pt_regs on the stack frame. When taking an
interrupt, we lower SP by the INT_FRAME_SIZE (that also accounts for
the redzone) and we store the registers at SP + STACK_FRAME_OVERHEAD,
this "overhead" is the size of a minimum caller stackframe, large enough
for the callee to store whatever it may store in the parent stackframe
without affecting the pt_regs values.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2004-04-28 2:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-28 1:11 stack frame for interrupts/exceptions in PPC Tameen Khan
2004-04-28 2:07 ` Benjamin Herrenschmidt [this message]
2004-04-28 17:41 ` Tameen Khan
2004-04-29 16:31 ` linas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1083118036.20092.30.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=tameen@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).