Re: Make MCA stack look like a normal kernel stack

From: David Mosberger <davidm_at_napali.hpl.hp.com>
Date: 2005-02-10 16:38:07
>>>>> On Thu, 10 Feb 2005 13:47:47 +1100, Keith Owens <kaos@sgi.com> said:

  Keith> The problem is that some of the dirty registers will be in
  Keith> the original stack, some will be in the MCA stack.

That's OK, libunwind already handles that.  The only thing that's
needed to make this work is that ar.bsp/ar.bspstore/ar.rnat are saved
and that those saves properly be described by the unwind-info.  The
rest will be automatic.  There is one problem though: in pt_regs, we
save the loadrs value instead of ar.bsp.  That can't be described at
the moment (the pt_regs code was written long before I knew about
unwind-info...).  However, since pt_regs is special anyhow, we can
just handle that in the unwinder, analogous to what we do for
signal-handlers (check_rbs_switch() in libunwind's src/ia64/Gstep.c).

  Keith> The preserved registers at the time of MCA/INIT still need to
  Keith> be saved so they can be restored on return to SAL.  Save the
  Keith> preserved registers, set the values that the kernel needs,
  Keith> call C code, restore original preserved registers, return to
  Keith> SAL.  Hmm, I just described struct switch_stack, didn't I?

True.  If you really return, then there is no need to even use switch_stack.
You'd just return and that magically restores the preserved registers.

	--david
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Thu Feb 10 00:38:35 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:35 EST