I have a question about OKL4 code

5 messages Options
Embed this post
Permalink
Josh Zhao

I have a question about OKL4 code

Reply Threaded More More options
Print post
Permalink
hi , I m reading the OKL4 version 2.1 for armv5 code, i have a qestion that the idle kernel thread creates the root server thread,but its handler function(initial_to_user) do nothing:
         BEGIN_PROC(initial_to_user)
        SET_USER_DACR
        RESTORE_ALL
        subs    pc,     lr,     #1
        END_PROC(initial_to_user)

it seems run forever, because there is no thread except idle. So how I create /delete other threads based L4?

_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer
Gabi Voiculescu

Re: I have a question about OKL4 code

Reply Threaded More More options
Print post
Permalink
I think (but am not sure) that this function is only supposed to change cpu mode from SVC (supervisor) to USER.

Somebody please correct me if i'm wrong.
Gabi Voiculescu

--- On Sat, 10/17/09, Josh Zhao <[hidden email]> wrote:

From: Josh Zhao <[hidden email]>
Subject: [okl4-developer] I have a question about OKL4 code
To: [hidden email]
Date: Saturday, October 17, 2009, 12:13 PM

hi , I m reading the OKL4 version 2.1 for armv5 code, i have a qestion that the idle kernel thread creates the root server thread,but its handler function(initial_to_user) do nothing:
         BEGIN_PROC(initial_to_user)
        SET_USER_DACR
        RESTORE_ALL
        subs    pc,     lr,     #1
        END_PROC(initial_to_user)

it seems run forever, because there is no thread except idle. So how I create /delete other threads based L4?

-----Inline Attachment Follows-----

_______________________________________________
Developer mailing list
Developer@...
https://lists.okl4.org/mailman/listinfo/developer


_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer
Josh Zhao

Re: I have a question about OKL4 code

Reply Threaded More More options
Print post
Permalink
yes, the root server will set the inital stack up with user mode,but there is no code in user mode.so I don't understand what it is used for.

2009/10/17 Gabi Voiculescu <[hidden email]>
I think (but am not sure) that this function is only supposed to change cpu mode from SVC (supervisor) to USER.

Somebody please correct me if i'm wrong.
Gabi Voiculescu

--- On Sat, 10/17/09, Josh Zhao <[hidden email]> wrote:

From: Josh Zhao <[hidden email]>
Subject: [okl4-developer] I have a question about OKL4 code
To: [hidden email]
Date: Saturday, October 17, 2009, 12:13 PM


hi , I m reading the OKL4 version 2.1 for armv5 code, i have a qestion that the idle kernel thread creates the root server thread,but its handler function(initial_to_user) do nothing:
         BEGIN_PROC(initial_to_user)
        SET_USER_DACR
        RESTORE_ALL
        subs    pc,     lr,     #1
        END_PROC(initial_to_user)

it seems run forever, because there is no thread except idle. So how I create /delete other threads based L4?

-----Inline Attachment Follows-----

_______________________________________________
Developer mailing list
Developer@...
https://lists.okl4.org/mailman/listinfo/developer



_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer
Gabi Voiculescu

Re: I have a question about OKL4 code

Reply Threaded More More options
Print post
Permalink
Hmmm.

I google searched for your problem and found that the way it was supposed to work is:

- the stack should be set up in crt0.spp under arch/arm/libs/c/crt (maybe this is the code you need)
- after initial_to_user the system should go to _start in the rootserver

I hope this helps. And if it does, a reply to clarify what was your problem and how you fixed it might help the community :;.

I guess I should thank you too since this search pointed me to something that might explain why I get qemu: fatal: bad mode 0 in my board emulator..

Gabi Voiculescu

--- On Sat, 10/17/09, Josh Zhao <[hidden email]> wrote:

From: Josh Zhao <[hidden email]>
Subject: Re: [okl4-developer] I have a question about OKL4 code
To: "Gabi Voiculescu" <[hidden email]>
Cc: [hidden email]
Date: Saturday, October 17, 2009, 2:39 PM

yes, the root server will set the inital stack up with user mode,but there is no code in user mode.so I don't understand what it is used for.

2009/10/17 Gabi Voiculescu <boy3dfx2@...>
I think (but am not sure) that this function is only supposed to change cpu mode from SVC (supervisor) to USER.

Somebody please correct me if i'm wrong.
Gabi Voiculescu

--- On Sat, 10/17/09, Josh Zhao <joshsystem@...> wrote:

From: Josh Zhao <joshsystem@...>
Subject: [okl4-developer] I have a question about OKL4 code
To: developer@...
Date: Saturday, October 17, 2009, 12:13 PM


hi , I m reading the OKL4 version 2.1 for armv5 code, i have a qestion that the idle kernel thread creates the root server thread,but its handler function(initial_to_user) do nothing:
         BEGIN_PROC(initial_to_user)
        SET_USER_DACR
        RESTORE_ALL
        subs    pc,     lr,     #1
        END_PROC(initial_to_user)

it seems run forever, because there is no thread except idle. So how I create /delete other threads based L4?

-----Inline Attachment Follows-----

_______________________________________________
Developer mailing list
Developer@...
https://lists.okl4.org/mailman/listinfo/developer




_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer
Josh Zhao

Re: I have a question about OKL4 code

Reply Threaded More More options
Print post
Permalink
Thanks Gabi, I m new to OKL4,I really want to know how kernel works.For me,reading source code is a good approach. Following your reply,I have another question:
   The crt0.spp is only wrapper that initilizes the __sys_init(),so how does initial_to_user function jump to crt0.spp ?

2009/10/17 Gabi Voiculescu <[hidden email]>
Hmmm.

I google searched for your problem and found that the way it was supposed to work is:

- the stack should be set up in crt0.spp under arch/arm/libs/c/crt (maybe this is the code you need)
- after initial_to_user the system should go to _start in the rootserver

I hope this helps. And if it does, a reply to clarify what was your problem and how you fixed it might help the community :;.

I guess I should thank you too since this search pointed me to something that might explain why I get qemu: fatal: bad mode 0 in my board emulator..


Gabi Voiculescu

--- On Sat, 10/17/09, Josh Zhao <[hidden email]> wrote:

From: Josh Zhao <[hidden email]>
Subject: Re: [okl4-developer] I have a question about OKL4 code
To: "Gabi Voiculescu" <[hidden email]>
Cc: [hidden email]
Date: Saturday, October 17, 2009, 2:39 PM


yes, the root server will set the inital stack up with user mode,but there is no code in user mode.so I don't understand what it is used for.

2009/10/17 Gabi Voiculescu <boy3dfx2@...>
I think (but am not sure) that this function is only supposed to change cpu mode from SVC (supervisor) to USER.

Somebody please correct me if i'm wrong.
Gabi Voiculescu

--- On Sat, 10/17/09, Josh Zhao <joshsystem@...> wrote:

From: Josh Zhao <joshsystem@...>
Subject: [okl4-developer] I have a question about OKL4 code
To: developer@...
Date: Saturday, October 17, 2009, 12:13 PM


hi , I m reading the OKL4 version 2.1 for armv5 code, i have a qestion that the idle kernel thread creates the root server thread,but its handler function(initial_to_user) do nothing:
         BEGIN_PROC(initial_to_user)
        SET_USER_DACR
        RESTORE_ALL
        subs    pc,     lr,     #1
        END_PROC(initial_to_user)

it seems run forever, because there is no thread except idle. So how I create /delete other threads based L4?

-----Inline Attachment Follows-----

_______________________________________________
Developer mailing list
Developer@...
https://lists.okl4.org/mailman/listinfo/developer





_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer