[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH ARM v6 14/14] mini-os: arm: show registers, stack and exception vector on fault



On Wed, 2014-07-16 at 12:07 +0100, Thomas Leonard wrote:
> +@ We want to store a unique value to identify this handler, without 
> corrupting
> +@ any of the registers. So, we store r15 (which will point just after the 
> branch).
> +@ Later, we subtract 12 so the user gets pointed at the start of the 
> exception
> +@ handler.

You do corrupt r13 though.

The way many OSes handle this is to make at least the initial saving
(i.e. that which you have at fault:) into a macro and inlining a copy at
each entry point. They also arrange for each SP_$mode to always point to
something useful (in your case fault_dump, I guess) to avoid using a
register as the save target.

BTW you can infer the same information as you do all this -12 stuff for
from the saved CPSR.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.