From: "Robert Raschke" <rtrlists@googlemail.com>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net>
Subject: Re: [9fans] P9P libthread on Debian ARM vs. makecontext et al.
Date: Tue, 8 Jul 2008 16:59:14 +0100 [thread overview]
Message-ID: <6a3ae47e0807080859q6925b967tc522028740458e27@mail.gmail.com> (raw)
In-Reply-To: <48737414.3000903@wmipf.in-berlin.de>
On 7/8/08, Michael Teichgräber <mt@wmipf.in-berlin.de> wrote:
> > The code in Linux.c that implements makecontext() for ARM expects this
> > struct to contain a gregs array. I'm guessing that gregs is the same
> > as the enumerated arm_* ones above. So, would I be correct in assuming
> > that gregs[13] is arm_sp and gregs[14] is arm_lr?
>
> Hi, I would say yes, as SP is r13 and LR is r14 on arm.
> To run Russ' libtask on arm7 I used the Linux-arm-asm.s and
> the arm-specific makecontext implementation from Linux.c,
> as well as the following structures.
>
> M.
> --
>
> enum {
> NREG = 16,
> };
>
> typedef
> struct Mcontext
> {
> u32int gregs[NREG]; /* general registers */
> } Mcontext;
>
> typedef
> struct ucontext
> {
> Mcontext uc_mcontext;
> sigset_t uc_sigmask;
> struct {
> void *ss_sp;
> u16int ss_size;
> } uc_stack;
>
> } ucontext_t;
>
Thanks, that's gotten me quite a bit further. I can compile the whole
lot now and run quite a few of the commands, including rc, under the
ARM qemulation. Hurrah.
Next I need to figure out why I get segfaults for some. And then try
it on real HW.
Robby
prev parent reply other threads:[~2008-07-08 15:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-08 13:01 Robert Raschke
2008-07-08 14:05 ` Michael Teichgräber
2008-07-08 15:59 ` Robert Raschke [this message]
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=6a3ae47e0807080859q6925b967tc522028740458e27@mail.gmail.com \
--to=rtrlists@googlemail.com \
--cc=9fans@9fans.net \
/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).