On Sat, Jul 08, 2006 at 03:43:56AM +0000, Horms wrote:
> Can anyone here recomend a good resource to learn ia64 assembly.

A god book is "Itanium architecture for programmers" by Evans and
Trimper.  But that book is really about optimising code, e.g. getting
every last cycle out of a modulo scheduled loop.  It is still
worthwhile, however.

> Basically, I want to change relocate_new_kernel so that it takes its
> physical address as an argument rather than deriving it from the ip.
> This is because I want to run the code in the xen hypervisor, where the
> virtual->physical mapping is different (mask the top 4 bits instead of
> 3), so its more convenient to rely on __pa() in the calling C code.

Well, I don't know much about Xen or kexec, but looking at the code
example I think it would be less clear to passing to
relocate_new_kernel it's physical address because clearly it can
derive it quite easily.  You can use __pa() in assembly anyway, where
it is just x - PAGE_OFFSET, otherwise why not just make the dep
instruction a macro, and #ifdef for Xen?

Also, I'm a big fan of (just about) every single line of assembly
having a comment.  IMHO nothing is obvious when writing in ASM.

> I got as far as passing an additional argument in, but any
> modifications I make to relocate_new_kernel beyond that cause it to
> stop functioning :(

The SKI simulator is your best friend here; it really is the only way
step through so you can find out what you borked.  It would be easy to
make a disk image with kexec tools on it; you can then set a
breakpoint and walk through what is happening.  If you want more
details a good place we can disucss it is on
[EMAIL PROTECTED]

-i
_______________________________________________
coders mailing list
[email protected]
http://lists.slug.org.au/listinfo/coders

Reply via email to