General porting procedures

As I have said before, I am not familiar with this architecture. You will need to understand your architecture to find which registers need to be stored as part of context.