linux-mips
[Top] [All Lists]

Static register access from outside scall_o32.S

To: linux-mips@oss.sgi.com
Subject: Static register access from outside scall_o32.S
From: Grant Taylor <gtaylor+mips@picante.com>
Date: Mon, 10 Dec 2001 13:53:16 -0500
Sender: owner-linux-mips@oss.sgi.com
Hi there.  I'm porting vmadump (a process checkpoint module) to
Linux/MIPS.  The thing now works, but to make it go I had to adjust
the entry and exit points in arch/mips/kernel/scall_o32.S such that
they always do SAVE_ALL and RESTORE_ALL_AND_RET.

Normally, it appears that "static" registers and probably a few others
are either left alone by the kernel code or stored on the stack
somewhere by the syscall and/or subsequent jump instructions.

Anywho, the rub is that the vmadump code needs for the passed-in
pt_regs to be complete, and needs for the syscall return path from it
to fully restore from pt_regs if it has been modified.  Obviously I'd
like to do this without making all syscalls store everything.

I see that marking the task for rescheduling will make all the
registers be saved and restored, but that's either *after* I'm
supposed to have copied all the register contents, or *before* I've
written new information to the pt_regs, so that's not it.

Is there any nice way to read and/or modifiy the static and other
"!SOME" register values from within my system call implementation?  I
assume I can find them on the stack somewhere, but that seems awfully
ugly.

-- 
Grant Taylor - gtaylor@picante.com - http://www.picante.com/~gtaylor/
  Linux Printing Website and HOWTO:  http://www.linuxprinting.org/

<Prev in Thread] Current Thread [Next in Thread>
  • Static register access from outside scall_o32.S, Grant Taylor <=