Re: vcpu example problem
Adam Lackorzynski <[email protected]>
| Newsgroups | gmane.comp.micro-kernel.l4.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, On Thu Aug 02, 2012 at 11:14:34 +0800, À×À×½¡ wrote: > Hi, > I am trying to modify the vcpu example of l4re-snapshot to > switch registers to execute my C function.But It doesn't work. > I have read some papers about l4linux tranplantion.and follow it . > To switch the process, I fill the vcpu_state_t structure with > its registers.and call vcpu_resume_commit action.Then Jump to the ASM > Code. > But problem arises when I want to jump from asm code to C > function. What's the Problem? The Code is as following: > #define SVC_MODE 0x00000013 > #define USR_MODE 0x00000010 > > asm volatile > ( > ".pushsection .text\n" > ".p2align 12 \t\n" > ".global my_super_code \t\n" > "my_super_code: \t\n" > " msr cpsr_c, r7\t\n" > " mov lr, r6 \t\n" > " mov pc, r5 \t\n" > //" b my_super_code \t\n" > ".popsection" > ); I think the problem is not the jump but the msr, which you cannot do in user-land and which you probably can safely remove. Adam -- Adam [email protected] Lackorzynski http://os.inf.tu-dresden.de/~adam/