All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Dugger <n0ano@valinux.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] Re: location of statcked registers after exception (superceeds previous email)
Date: Fri, 04 May 2001 14:02:21 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590693005535@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590693005534@msgid-missing>

Wei-

The file `arch/ia64/kernel/ivt.S' contains the interrupt vector table.
This is where all exceptions go.

On Thu, May 03, 2001 at 11:51:26PM -0700, Weihaw CHUANG wrote:
> 
> I think I've figured out my own question.  However I still would like to
> understand some of this kernel code in 
> <linux src>/arch/ia64/kernel/entry.S
> 
> If my application takes an exception, what is the entry point in entry.S?
> I'd also like to verify that application stacked registers  will be
> stored on kernel stack during a context switch.  My understanding is that
> only the last procedure frame will be stored there.  (Is this notion
> correct?)
> 
> I'm still very unsure if my intuition is correct, hence the
> questions.  I only figured out the below through trial and error
> hacking.
> 
> Anyways the solution appears to be (again correct me if anything is brain 
> damaged):
> 
> On Thu, 3 May 2001, Weihaw CHUANG wrote:
> 
> > 
> >   int offset = cfm.sof - (regid-32)
> >   unsigned long long = ptrace(PTRACED_PEEKUSER, pid, PT_AR_BSP, 0);
> >   regvalue = ptrace(PTRACE_PEEKDATA, pid, 
> >                     (long ) ia64_rse_skip_regs((long*) bsp, offset), 0);
> > 
> 
> int offset = regid - 32;
> unsigned long long bspstore = ptrace(PTRACED_PEEKUSER, pid,
>                                     PT_AR_BSPSTORE, 0);
> unsigned long long regvalue = ptrace(PTRACE_PEEKDATA, pid,
>                      (long) ia64_rse_skip_regs((long*) bspstore, offset),
>                      0);
> 
> 
> I'd like to be pendantic, and make sure the following intuition is
> correct.  Ptrace dumps seems to agree so far.
> 
> > 
> > 
> > That is, does this diagram make sense? 
> > 
> > alloc r35 = ar.pfs, 0, 3, 0, 0
> > reg stack
> >    | r32    | r34      | r35    |   (r35 is top of reg stack)
> > negative offset from bsp is:
> >      3        2          1        bsp
> offset from 
>      ^bspstore
>        0        1          2
> 
> Thanks!!
> -Wei
> 
> 
> _______________________________________________
> Linux-IA64 mailing list
> Linux-IA64@linuxia64.org
> http://lists.linuxia64.org/lists/listinfo/linux-ia64

-- 
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
n0ano@valinux.com
Ph: 303/938-9838


  reply	other threads:[~2001-05-04 14:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-04  6:51 [Linux-ia64] Re: location of statcked registers after exception (superceeds previous email) Weihaw CHUANG
2001-05-04 14:02 ` Don Dugger [this message]
2001-05-04 15:02 ` David Mosberger

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=marc-linux-ia64-105590693005535@msgid-missing \
    --to=n0ano@valinux.com \
    --cc=linux-ia64@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.