On Sun, 20 Feb 2005 19:48:55 +0100
"Blue Swirl" <[EMAIL PROTECTED]> wrote:
> Qemu's Sparc32 system emulator is getting to the point where the first user
> space application almost executes. But there is some strangeness with
> kernel's use of %g6, it's used for example in do_sparc_fault, but nothing is
> restoring it before that, so there is a kernel zero page access as a result.
%g6 is loaded at "arch/sparc/kernel/etrap.S:trap_setup_from_user" by the
"LOAD_CURRENT()" macro.
At context switch time, it is updated by the switch_to() macro.
At bootup, the first cpu sets up it's %g6 in arch/sparc/kernel/head.S
by this instruction:
set init_thread_union, %g6
and on SMP, subsequent processors setup their %g6 via this instruction
sequence in arch/sparc/kernel/trampoline.S:
/* Give ourselves a stack and curptr. */
set current_set, %g5
srl %g3, 10, %g4
and %g4, 0xc, %g4
ld [%g5 + %g4], %g6
It's all very nearly the same as 2.4.x
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html