Re: l4-hackers Digest, Vol 112, Issue 3

"raylei0825ssdut" <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
I just remove the statement "msr cpsr_c,r7". But It just doesn't Work. And If I change the code to the following:
I set the vcpu_state_t registers  as following :
  vcpu->r()->r[6]=(l4_umword_t)exit_map_addr;
  vcpu->r()->r[4]=(l4_umword_t)(idle_stack+sizeof(idle_stack)-1);  vcpu->r()->ip =(l4_umword_t)super_code_map_addr;  vcpu->r()->r[5] = (l4_umword_t)idle_code_map_addr;  vcpu->r()->sp = (l4_umword_t)0x30000;
and I change the my_super_code :
asm (    ".pushsection .text\n"  ".p2align 12         \t\n"  ".global my_super_code  \t\n"  "my_super_code:   \t\n"
" swi 0       \t\n"
" mov sp, r4   \t\n"" mov lr, r6   \t\n"" mov pc, r5   \t\n"".popsection");
and still, it doesn't work.And The vcpu upcall function 
will be called again and again.

2012-08-03



raylei0825ssdut



发件人:l4-hackers-request
发送时间:2012-08-03 18:00
主题:l4-hackers Digest, Vol 112, Issue 3
收件人:"l4-hackers"<[email protected]>
抄送:

Send l4-hackers mailing list submissions to 
    [email protected] 

To subscribe or unsubscribe via the World Wide Web, visit 
    http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers 
or, via email, send a message with subject or body 'help' to 
    [email protected] 

You can reach the person managing the list at 
    [email protected] 

When replying, please edit your Subject line so it is more specific 
than "Re: Contents of l4-hackers digest..." 


Today's Topics: 

   1. Re: vcpu example problem (Adam Lackorzynski) 


---------------------------------------------------------------------- 

Message: 1 
Date: Thu, 2 Aug 2012 22:14:21 +0200 
From: Adam Lackorzynski <[email protected]> 
To: [email protected] 
Subject: Re: vcpu example problem 
Message-ID: <[email protected]> 
Content-Type: text/plain; charset=iso-8859-1 

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/ 



------------------------------ 

_______________________________________________ 
l4-hackers mailing list 
[email protected] 
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers 


End of l4-hackers Digest, Vol 112, Issue 3 
******************************************

_______________________________________________
l4-hackers mailing list
[email protected]
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.