From: chas williams <chas@cmf.nrl.navy.mil>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] still patching syscall into module
Date: Wed, 01 Aug 2001 20:59:22 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590693005981@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590693005967@msgid-missing>
in case anyone cares i think the following is the answer to my problem
.globl module_syscall_stub
alloc r42 = ar.pfs, 8, 3, 6, 0
mov r41 = b0
mov r43 = r32
mov r44 = r33
mov r45 = r34
mov r46 = r35
mov r47 = r36
mov r48 = gp
;;
movl r15=<fptr adddress>
;;
ld8 r16=[r15],8
;;
ld8 gp=[r15]
mov b6=r16
br.call.sptk.many b0 = b6
;;
mov ar.pfs = r42
mov b0 = r41
mov gp = r48
br.ret.sptk.many b0
.endp module_syscall_stub
perhaps someone could comment but i mostly just wrote this based on what
i read in the software developer's manual. i allocate a little space on
the register stack, pass along the args (only 5 actually) and then call
the routine in the module via its fptr (patched 'dynamically' at insmod)
after returning the gp is restored from the saved registers. the old
rp is called (which should be ia64_leave_kernel or something similar)
prev parent reply other threads:[~2001-08-01 20:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-31 10:57 [Linux-ia64] still patching syscall into module chas williams
2001-08-01 11:43 ` chas williams
2001-08-01 20:59 ` chas williams [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=marc-linux-ia64-105590693005981@msgid-missing \
--to=chas@cmf.nrl.navy.mil \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox