Hi everyone,
I am running a simple "tz_vmm" example in Genode on imx53 qsb. I have Noux application which runs on top of Noux runtime inside the secure world. I wanted to access this Noux applications inside tz_vmm application, calling a function of Noux application from tz_vmm code. But i have no idea how to do that. Could anyone please give me some hint?
Thanks and best regards, Joseph
Hello Joseph,
On Sat, Oct 17, 2015 at 12:31:09PM +0200, Joseph Lee wrote:
I am running a simple "tz_vmm" example in Genode on imx53 qsb. I have Noux application which runs on top of Noux runtime inside the secure world. I wanted to access this Noux applications inside tz_vmm application, calling a function of Noux application from tz_vmm code. But i have no idea how to do that. Could anyone please give me some hint?
What you're trying to achieve is to run two components (tz_vmm and a Noux process) and trigger the execution of a function in the Noux process by the tz_vmm component, right? I fear that my rephrasing does not make anything more clear in your application scenario but I will nevertheless try to propose a direction to follow.
The Noux environment provides a POSIX runtime and POSIX (pthreads etc. aside) is all about files when it comes to data exchange. So, you may monitor a file (e.g., via select()) in the program. If you place the file in a ram_fs and permit access to the file system to both, the Noux process and tz_vmm, tz_vmm could trigger code execution in the Noux process by writing into the file that is monitored. This scenario should also work on any POSIX system where you may implement a prototype.
In case I got you wrong, please try to elaborate more on your goals or give more details about your scenario.
Regards
Hi Christian,
Thank you for your answers.
You are right, you define my application scenario correctly.
Now i am trying implement the solution you have suggested me, but I have an error. I place a file in a ram_fs file system and permit access to the file system to a Noux process. I got the following log messages when I tried to access the file from the Noux process. The name of the Noux process is test. Appreciate if someone can help.
no RM attachment (READ pf_addr=0 pf_ip=84ad from b2cfd156 test) void Genode::Signal_transmitter::submit(unsigned int): failed - error 4 static void Genode::Pager_object::_page_fault_handler(Genode::addr_t): page fault, thread 'test', cpu 0, ip=84ad, fault address=0x0
Thanks,
On Mon, Oct 19, 2015 at 11:34 AM, Christian Helmuth < christian.helmuth@...1...> wrote:
Hello Joseph,
On Sat, Oct 17, 2015 at 12:31:09PM +0200, Joseph Lee wrote:
I am running a simple "tz_vmm" example in Genode on imx53 qsb. I have
Noux
application which runs on top of Noux runtime inside the secure world. I wanted to access this Noux applications inside tz_vmm application,
calling
a function of Noux application from tz_vmm code. But i have no idea how
to
do that. Could anyone please give me some hint?
What you're trying to achieve is to run two components (tz_vmm and a Noux process) and trigger the execution of a function in the Noux process by the tz_vmm component, right? I fear that my rephrasing does not make anything more clear in your application scenario but I will nevertheless try to propose a direction to follow.
The Noux environment provides a POSIX runtime and POSIX (pthreads etc. aside) is all about files when it comes to data exchange. So, you may monitor a file (e.g., via select()) in the program. If you place the file in a ram_fs and permit access to the file system to both, the Noux process and tz_vmm, tz_vmm could trigger code execution in the Noux process by writing into the file that is monitored. This scenario should also work on any POSIX system where you may implement a prototype.
In case I got you wrong, please try to elaborate more on your goals or give more details about your scenario.
Regards
Christian Helmuth Genode Labs
http://www.genode-labs.com/ · http://genode.org/ https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hello Joseph,
On Tue, Oct 20, 2015 at 05:15:29PM +0200, Joseph Lee wrote:
Now i am trying implement the solution you have suggested me, but I have an error. I place a file in a ram_fs file system and permit access to the file system to a Noux process. I got the following log messages when I tried to access the file from the Noux process. The name of the Noux process is test. Appreciate if someone can help.
no RM attachment (READ pf_addr=0 pf_ip=84ad from b2cfd156 test) void Genode::Signal_transmitter::submit(unsigned int): failed - error 4 static void Genode::Pager_object::_page_fault_handler(Genode::addr_t): page fault, thread 'test', cpu 0, ip=84ad, fault address=0x0
This means your test program is dereferencing a pointer to address 0, i.e., a NULL pointer. The message represent what you may know as "segmentation fault (SEGV)" from POSIX. So please check your program why the pointer you're dereferencing points to 0. Does the program work when compiled and executed on Linux?
Regards
Hi Christian,
Thank you for your answers. it really helps me out a lot.
I am trying to test the techniques you mentioned about accessing a function of a Noux process from tz_vmm. I put a file in a ram_fs and allow access to both my noux process and tz_vmm. When i run the uImage, the file is accessed by the noux process successfully but the tz_vmm process can't access it. Instead i got the following log message. what is missing?
init -> tz_vmm -> vmm: unresolved pagefault at ip=73930 sp=e01fcf28
core -> pager_ep: cannot submit unknown signal context
thanks and best regards,
On Tue, Oct 20, 2015 at 9:37 PM, Christian Helmuth < christian.helmuth@...1...> wrote:
Hello Joseph,
On Tue, Oct 20, 2015 at 05:15:29PM +0200, Joseph Lee wrote:
Now i am trying implement the solution you have suggested me, but I have
an
error. I place a file in a ram_fs file system and permit access to the
file
system to a Noux process. I got the following log messages when I tried
to
access the file from the Noux process. The name of the Noux process is test. Appreciate if someone can help.
no RM attachment (READ pf_addr=0 pf_ip=84ad from b2cfd156 test) void Genode::Signal_transmitter::submit(unsigned int): failed - error
4
static void Genode::Pager_object::_page_fault_handler(Genode::addr_t): page fault, thread 'test', cpu 0, ip=84ad, fault address=0x0
This means your test program is dereferencing a pointer to address 0, i.e., a NULL pointer. The message represent what you may know as "segmentation fault (SEGV)" from POSIX. So please check your program why the pointer you're dereferencing points to 0. Does the program work when compiled and executed on Linux?
Regards
Christian Helmuth Genode Labs
http://www.genode-labs.com/ · http://genode.org/ https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hello,
On Fri, Oct 23, 2015 at 12:44:52AM +0200, Joseph Lee wrote:
I am trying to test the techniques you mentioned about accessing a function of a Noux process from tz_vmm. I put a file in a ram_fs and allow access to both my noux process and tz_vmm. When i run the uImage, the file is accessed by the noux process successfully but the tz_vmm process can't access it. Instead i got the following log message. what is missing?
init -> tz_vmm -> vmm: unresolved pagefault at ip=73930 sp=e01fcf28 core -> pager_ep: cannot submit unknown signal context
You again triggered a page fault, i.e., segmentation fault, maybe due to an uninitialized pointer. To help you we should post your changes to tz_vmm for ram_fs access to this list. Then, we may investigate.
Greets
Hi,
Here is the code that i put in tz_vmm.
int fd; char buffer[10]; char const *file_name = "/home/test.txt";
if( ( fd = open(file_name, O_WRONLY | O_CREAT) ) != -1 ) write( fd, "TEST ", 4 ); else printf("File could not be opened"); close( fd );
And also I configure ram_fs for tz_vmm access to the file system as follows.
<config> <content> <dir name="home"> <inline name="test.txt"> </inline> </dir> </content> <policy label="tz_vmm -> root" root="/" /> <policy label="tz_vmm -> home" root="/home" writeable="yes" /> </config>
Please tell me if there is something wrong or missing ?
Thanks and best regards,
On Mon, Oct 26, 2015 at 11:07 AM, Christian Helmuth < christian.helmuth@...1...> wrote:
Hello,
On Fri, Oct 23, 2015 at 12:44:52AM +0200, Joseph Lee wrote:
I am trying to test the techniques you mentioned about accessing a
function
of a Noux process from tz_vmm. I put a file in a ram_fs and allow access
to
both my noux process and tz_vmm. When i run the uImage, the file is accessed by the noux process successfully but the tz_vmm process can't access it. Instead i got the following log message. what is missing?
init -> tz_vmm -> vmm: unresolved pagefault at ip=73930
sp=e01fcf28
core -> pager_ep: cannot submit unknown signal context
You again triggered a page fault, i.e., segmentation fault, maybe due to an uninitialized pointer. To help you we should post your changes to tz_vmm for ram_fs access to this list. Then, we may investigate.
Greets
Christian Helmuth Genode Labs
http://www.genode-labs.com/ · http://genode.org/ https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hello,
see my answer below the quoted text.
On Mon, Oct 26, 2015 at 12:54:13PM +0100, Joseph Lee wrote:
Here is the code that i put in tz_vmm.
int fd; char buffer[10]; char const *file_name = "/home/test.txt";
if( ( fd = open(file_name, O_WRONLY | O_CREAT) ) != -1 ) write( fd, "TEST ", 4 ); else printf("File could not be opened"); close( fd );
Adding the attached patch that is derived from your changes above, I got the expected error
../imx53/main.cc: In function ‘int main()’: /plain/krishna/src/genode/genode_staging.git/repos/os/src/server/tz_vmm/spec/imx53_qsb/../imx53/main.cc:143:21: error: ‘O_WRONLY’ was not declared in this scope int fd = open("x", O_WRONLY | O_CREAT);
tz_vmm in its virgin version in our repositories does not use the libc and, therefore, can't use the file system as you described. Please provide us with a working patch for Genode 15.08 or Git branch on GitHub as we otherwise can't reproduce your issue.
Regards
Hi Christian,
please find attached patches for Genode 15.08.
Thanks,
On Mon, Oct 26, 2015 at 1:25 PM, Christian Helmuth < christian.helmuth@...1...> wrote:
Hello,
see my answer below the quoted text.
On Mon, Oct 26, 2015 at 12:54:13PM +0100, Joseph Lee wrote:
Here is the code that i put in tz_vmm.
int fd; char buffer[10]; char const *file_name = "/home/test.txt";
if( ( fd = open(file_name, O_WRONLY | O_CREAT) ) != -1 ) write( fd, "TEST ", 4 ); else printf("File could not be opened"); close( fd );
Adding the attached patch that is derived from your changes above, I got the expected error
../imx53/main.cc: In function ‘int main()’: /plain/krishna/src/genode/genode_staging.git/repos/os/src/server/tz_vmm/spec/imx53_qsb/../imx53/main.cc:143:21: error: ‘O_WRONLY’ was not declared in this scope int fd = open("x", O_WRONLY | O_CREAT);
tz_vmm in its virgin version in our repositories does not use the libc and, therefore, can't use the file system as you described. Please provide us with a working patch for Genode 15.08 or Git branch on GitHub as we otherwise can't reproduce your issue.
Regards
Christian Helmuth Genode Labs
http://www.genode-labs.com/ · http://genode.org/ https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hello Joseph,
On Mon, Oct 26, 2015 at 03:28:40PM +0100, Joseph Lee wrote:
please find attached patches for Genode 15.08.
Your patches do not apply to Genode 15.08. Therefore, I assume you're using the genode/master branch.
Also, what your patches are missing is a simple test case in terms of a run script. The script will really help to understand and investigate your scenario as it does not only reflect implementation changes but also the init config and how your image is assembled - in other words: The run script is essential to reproduce your issue.
Nevertheless, I have a hint what might went wrong: Did you configure the VFS of tz_vmm in your scenario? Please refer to
repos/libports/run/libc_vfs.run
for a really simple scenario. In your case you need to add a node for the ram_fs via an <fs/> node.
Regards
Hi Christian,
Thank you so much!
Now it works. There was a problem with the file system (ram_fs) configuration in the run script. But it only works when i perform the file access inside the *main()* function of tz_vmm. it generates the following error when i try to access the file inside *_handle_hypervisor_call()* function after the normal world performs a secure method call (smc) to the secure world. Can you please tell me what is missing?
* int -> tz_vmm ->vmm: unresolved pagefault at ip=700ac620 sp=e01fcfe8 core -> pager_ep: cannot submit unknown signal context.* thanks,
On Tue, Oct 27, 2015 at 2:45 PM, Christian Helmuth < christian.helmuth@...1...> wrote:
Hello Joseph,
On Mon, Oct 26, 2015 at 03:28:40PM +0100, Joseph Lee wrote:
please find attached patches for Genode 15.08.
Your patches do not apply to Genode 15.08. Therefore, I assume you're using the genode/master branch.
Also, what your patches are missing is a simple test case in terms of a run script. The script will really help to understand and investigate your scenario as it does not only reflect implementation changes but also the init config and how your image is assembled - in other words: The run script is essential to reproduce your issue.
Nevertheless, I have a hint what might went wrong: Did you configure the VFS of tz_vmm in your scenario? Please refer to
repos/libports/run/libc_vfs.run
for a really simple scenario. In your case you need to add a node for the ram_fs via an <fs/> node.
Regards
Christian Helmuth Genode Labs
http://www.genode-labs.com/ · http://genode.org/ https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hello Joseph,
congrats that you managed to access the file system.
On Wed, Oct 28, 2015 at 07:33:26PM +0100, Joseph Lee wrote:
Now it works. There was a problem with the file system (ram_fs) configuration in the run script. But it only works when i perform the file access inside the *main()* function of tz_vmm. it generates the following error when i try to access the file inside *_handle_hypervisor_call()* function after the normal world performs a secure method call (smc) to the secure world. Can you please tell me what is missing?
The actual hypervisor call is handled by a thread beside the main thread. In tz_vmm.cc:52 the stack size of the thread is defined to 8K which is too small to execute legacy code like the libc. Please change to line to something like
class Vmm::Vmm : public Thread<0x8000>
and retry.
Happy hacking
Hi Christian,
Thank you so much! it works now.
Best regards,
On Thu, Oct 29, 2015 at 9:47 AM, Christian Helmuth < christian.helmuth@...1...> wrote:
Hello Joseph,
congrats that you managed to access the file system.
On Wed, Oct 28, 2015 at 07:33:26PM +0100, Joseph Lee wrote:
Now it works. There was a problem with the file system (ram_fs) configuration in the run script. But it only works when i perform the
file
access inside the *main()* function of tz_vmm. it generates the following error when i try to access the file inside *_handle_hypervisor_call()* function after the normal world performs a secure method call (smc) to
the
secure world. Can you please tell me what is missing?
The actual hypervisor call is handled by a thread beside the main thread. In tz_vmm.cc:52 the stack size of the thread is defined to 8K which is too small to execute legacy code like the libc. Please change to line to something like
class Vmm::Vmm : public Thread<0x8000>
and retry.
Happy hacking
Christian Helmuth Genode Labs
http://www.genode-labs.com/ · http://genode.org/ https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hi Christian,
I have one more question. i know that ram__fs file system creates a storage area in RAM and will continue using it util the system runs out of RAM. So when i put a large file in the file system it says out of memory. Could you please tell me maybe if there is a way to store a large file into sdcard partition?
Thanks,
On Thursday, October 29, 2015, Joseph Lee <leejose911@...9...> wrote:
Hi Christian,
Thank you so much! it works now.
Best regards,
On Thu, Oct 29, 2015 at 9:47 AM, Christian Helmuth < christian.helmuth@...1... javascript:_e(%7B%7D,'cvml','christian.helmuth@...1...');> wrote:
Hello Joseph,
congrats that you managed to access the file system.
On Wed, Oct 28, 2015 at 07:33:26PM +0100, Joseph Lee wrote:
Now it works. There was a problem with the file system (ram_fs) configuration in the run script. But it only works when i perform the
file
access inside the *main()* function of tz_vmm. it generates the
following
error when i try to access the file inside *_handle_hypervisor_call()* function after the normal world performs a secure method call (smc) to
the
secure world. Can you please tell me what is missing?
The actual hypervisor call is handled by a thread beside the main thread. In tz_vmm.cc:52 the stack size of the thread is defined to 8K which is too small to execute legacy code like the libc. Please change to line to something like
class Vmm::Vmm : public Thread<0x8000>
and retry.
Happy hacking
Christian Helmuth Genode Labs
http://www.genode-labs.com/ · http://genode.org/ https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
genode-main mailing list genode-main@lists.sourceforge.net javascript:_e(%7B%7D,'cvml','genode-main@lists.sourceforge.net'); https://lists.sourceforge.net/lists/listinfo/genode-main
Hello Joseph,
On Tue, Nov 03, 2015 at 01:31:55AM +0100, Joseph Lee wrote:
I have one more question. i know that ram__fs file system creates a storage area in RAM and will continue using it util the system runs out of RAM. So when i put a large file in the file system it says out of memory. Could you please tell me maybe if there is a way to store a large file into sdcard partition?
First, the RAM quota that may be used by the ram_fs can be configured in the init <start> node with the sub node
<resource name="RAM" quantum="..."/>
but you're right: The file size is limited by the amount of available RAM of the platform, which is not that much on the i.MX53 QSB.
If you target to use an SD card as storage media you'll need a stack of components (bottom-up)
- A driver for the SD card controller and the actual SD card (protocol). We are busy to stabilize our implementation for i.MX53 currently on the following branch
https://github.com/m-stein/genode/commits/1497_usb_armory_demo
but you may give the "make run/sd_card" scenario a try. Please make sure to use a separate SD card for such testing to not corrupt your master card. The SD-card driver provides a Block session to access the contents of the actual card.
- Optionally, you may need a partition-table driver if your card is partitioned, which will be the case if the card is also your boot device. Our implementation is part_blk which supports MSDOS as well as GPT partition tables and provides a Block session for each partition found on the Block session used by the driver.
- Next, you'll need a file-system implementation, which uses the Block session and provides a file-based API. Our implementation for FAT uses the ffat library. Please have a look at
repos/libports/run/libc_ffat.run.
Depending on the use case the file-system library is directly linked to the application or into a File_system server in Genode 15.08. We have still some loose ends here that we're busy to tie up. In the upcoming Genode 15.11, we strive to consolidate all file-system related functionality into the VFS, which renders the use of a file-system server vs. a local plugin instance just a matter of configuration.
To sum it up from the background of your use case I have no ready to use configuration you may just reuse. Therefore, I suggest you walk on step by step and ask specific questions if issues occur. One side note from me: If you could imagine to use ext2 on a second partition of your SD card, you may use the rump_fs server like in
repos/dde_rump/run/rump_ext2.run
which also illustrates how to configure your libc application with a mount point for the file system.
Regards
Hi Christian,
Thank you for your explanation!
I just try "make run/sd_card" on imx53QSB using this branch ( https://github.com/m-stein/genode/commits/1497_usb_armory_demo) https://github.com/m-stein/genode/commits/1497_usb_armory_demo
it displays the following log messages and hangs. It doesn't even start the test application (test/test-blk-cli) included the run script. Is the sd_card driver working? or what is missing?
kernel initialized Genode 15.08 int main(): create local services int main(): start init int main(): transferred 248 MB to init int main(): init created, waiting for exit condition
[init -> sd_card_drv] Could not open ROM session for module "config [init -> sd_card_drv] Could not obtain config file [init -> sd_card_drv] no VFS configured [init -> sd_card_drv] --- Imx53 SD card driver ---
Thanks,
On Tue, Nov 3, 2015 at 8:39 AM, Christian Helmuth < christian.helmuth@...1...> wrote:
Hello Joseph,
On Tue, Nov 03, 2015 at 01:31:55AM +0100, Joseph Lee wrote:
I have one more question. i know that ram__fs file system creates a
storage
area in RAM and will continue using it util the system runs out of RAM.
So
when i put a large file in the file system it says out of memory. Could
you
please tell me maybe if there is a way to store a large file into sdcard partition?
First, the RAM quota that may be used by the ram_fs can be configured in the init <start> node with the sub node
<resource name="RAM" quantum="..."/>
but you're right: The file size is limited by the amount of available RAM of the platform, which is not that much on the i.MX53 QSB.
If you target to use an SD card as storage media you'll need a stack of components (bottom-up)
A driver for the SD card controller and the actual SD card (protocol). We are busy to stabilize our implementation for i.MX53 currently on the following branch
https://github.com/m-stein/genode/commits/1497_usb_armory_demo
but you may give the "make run/sd_card" scenario a try. Please make sure to use a separate SD card for such testing to not corrupt your master card. The SD-card driver provides a Block session to access the contents of the actual card.
Optionally, you may need a partition-table driver if your card is partitioned, which will be the case if the card is also your boot device. Our implementation is part_blk which supports MSDOS as well as GPT partition tables and provides a Block session for each partition found on the Block session used by the driver.
Next, you'll need a file-system implementation, which uses the Block session and provides a file-based API. Our implementation for FAT uses the ffat library. Please have a look at
repos/libports/run/libc_ffat.run.
Depending on the use case the file-system library is directly linked to the application or into a File_system server in Genode 15.08. We have still some loose ends here that we're busy to tie up. In the upcoming Genode 15.11, we strive to consolidate all file-system related functionality into the VFS, which renders the use of a file-system server vs. a local plugin instance just a matter of configuration.
To sum it up from the background of your use case I have no ready to use configuration you may just reuse. Therefore, I suggest you walk on step by step and ask specific questions if issues occur. One side note from me: If you could imagine to use ext2 on a second partition of your SD card, you may use the rump_fs server like in
repos/dde_rump/run/rump_ext2.run
which also illustrates how to configure your libc application with a mount point for the file system.
Regards
Christian Helmuth Genode Labs
http://www.genode-labs.com/ · http://genode.org/ https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hi Joseph
Am 05.11.2015 um 00:52 schrieb Joseph Lee:
I just try "make run/sd_card" on imx53QSB using this branch (https://github.com/m-stein/genode/commits/1497_usb_armory_demo) https://github.com/m-stein/genode/commits/1497_usb_armory_demo
This working branch is a good starting point as it contains some ESDHC fixes that are not on master yet. I've updated it last night. Do you have the latest version?
it displays the following log messages and hangs. It doesn't even start the test application (test/test-blk-cli) included the run script. Is the sd_card driver working? or what is missing?
Be aware, that you should not run 'sd_card' with Genodes Trustzone feature-set (platform 'hw_imx53_qsb_tz'), because Genode will then declare the ESDHC-IRQ to be unsecure to enable Linux to drive SD cards. Use the platform 'hw_imx53_qsb' instead when issuing 'create_builddir'.
Doing so, 'sd_card' succeeds on my i.Mx53. But make sure to cancel the test before the "write" stage begins if you don't want to risk data loss on your card. Did that solve your problems?
Cheers,
Hi,
Thanks a lot Martin. it works. Now I try to modify the sd_card.run script based on what Christian mentioned above and make run/sd_card again. I get an error log message "Completion host signal timed out ". I have attached the whole log message here. I appreciate if you can tell me what is missing. Thanks
On Thu, Nov 5, 2015 at 2:36 PM, Martin Stein <martin.stein@...1...> wrote:
Hi Joseph
Am 05.11.2015 um 00:52 schrieb Joseph Lee:
I just try "make run/sd_card" on imx53QSB using this branch (https://github.com/m-stein/genode/commits/1497_usb_armory_demo) https://github.com/m-stein/genode/commits/1497_usb_armory_demo
This working branch is a good starting point as it contains some ESDHC fixes that are not on master yet. I've updated it last night. Do you have the latest version?
it displays the following log messages and hangs. It doesn't even start the test application (test/test-blk-cli) included the run script. Is the sd_card driver working? or what is missing?
Be aware, that you should not run 'sd_card' with Genodes Trustzone feature-set (platform 'hw_imx53_qsb_tz'), because Genode will then declare the ESDHC-IRQ to be unsecure to enable Linux to drive SD cards. Use the platform 'hw_imx53_qsb' instead when issuing 'create_builddir'.
Doing so, 'sd_card' succeeds on my i.Mx53. But make sure to cancel the test before the "write" stage begins if you don't want to risk data loss on your card. Did that solve your problems?
Cheers,
genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hi,
This is the whole log message attached in the previous email. I think the log message might show the components that are included in the run script.
Can anyone please tell me something about 'Completion host signal timed out' error message?
Starting kernel ... kernel initialized Genode 15.08 int main():-- create local services --- int main(): --- start init --- int main(): transferred 998 MB to init int main(): --- init created, waiting for exit condition --- [init -> sd_card_drv] --- Imx53 SD card driver --- [init -> sd_card_drv] SD card detected [init -> sd_card_drv] capacity: 29664 MiB [init -> part_blk] Partition 1: LBA 2048 (8396800 blocks) type: 83 [init -> part_blk] Partition 2: LBA 8398848 (52353024 blocks) type: 83 [init -> rump_fs] Using ext2fs as file system [init -> rump_fs] int rumpuser_init(int,const rumpuser_hyperup*): RUMP ver: 17 [init -> rump_fs] int rumpuser_getparam(const char*, void*, size_t): RUMP_THREADS [init -> rump_fs] int rumpuser_getparam(const char*, void*, size_t): RUMP_VERBOSE [init -> rump_fs] int rumpuser_getparam(const char*, void*, size_t): RUMPUSER_NCPU [init -> rump_fs] int rumpuser_getparam(const char*, void*, size_t): RUMP_MEMLIMIT [init -> rump_fs] Asserting rump kernel 4280 KB of RAM [init -> rump_fs] BOOTSTRAP [init -> rump_fs] int rumpuser_getparam(const char*, void*, size_t): RUMP_NVNODES [init -> rump_fs] int rumpuser_getparam(const char*, void*, size_t): RUMP_BLKFAIL [init -> rump_fs] int rumpuser_getparam(const char*, void*, size_t): RUMP_BLKSECTSHIFT [init -> rump_fs] int rumpuser_getparam(const char*, void*, size_t): RUMPUSER_HOSTNAME [init -> part_blk] session opened at partition 2 for 'rump_fs' [init -> rump_fs] Backend::Backend(): Backend blk_size 512 [init -> rump_fs] rump: genode: file system not clean; please fsck(8) [init -> test-libc_vfs] calling mkdir(dir_name, 0777) dir_name=testdir [init -> sd_card_drv] Completion host signal timed out [init -> test-libc_vfs] mkdir(dir_name, 0777) failed, ret=-1, errno=28 [init] virtual void Genode::Child_policy::exit(int): child "test-libc_vfs" exited with exit value -1 [init -> sd_card_drv] Completion host signal timed out [init -> sd_card_drv] Completion host signal timed out [init -> sd_card_drv] Completion host signal timed out [init -> sd_card_drv] Completion host signal timed out [init -> sd_card_drv] Completion host signal timed out
Thanks,
On Sat, Nov 7, 2015 at 3:17 AM, Joseph Lee <leejose911@...9...> wrote:
Hi,
Thanks a lot Martin. it works. Now I try to modify the sd_card.run script based on what Christian mentioned above and make run/sd_card again. I get an error log message "Completion host signal timed out ". I have attached the whole log message here. I appreciate if you can tell me what is missing. Thanks
On Thu, Nov 5, 2015 at 2:36 PM, Martin Stein <martin.stein@...1...
wrote:
Hi Joseph
Am 05.11.2015 um 00:52 schrieb Joseph Lee:
I just try "make run/sd_card" on imx53QSB using this branch (https://github.com/m-stein/genode/commits/1497_usb_armory_demo) https://github.com/m-stein/genode/commits/1497_usb_armory_demo
This working branch is a good starting point as it contains some ESDHC fixes that are not on master yet. I've updated it last night. Do you have the latest version?
it displays the following log messages and hangs. It doesn't even start the test application (test/test-blk-cli) included the run script. Is the sd_card driver working? or what is missing?
Be aware, that you should not run 'sd_card' with Genodes Trustzone feature-set (platform 'hw_imx53_qsb_tz'), because Genode will then declare the ESDHC-IRQ to be unsecure to enable Linux to drive SD cards. Use the platform 'hw_imx53_qsb' instead when issuing 'create_builddir'.
Doing so, 'sd_card' succeeds on my i.Mx53. But make sure to cancel the test before the "write" stage begins if you don't want to risk data loss on your card. Did that solve your problems?
Cheers,
genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hey Joseph,
Am 11.11.2015 um 00:53 schrieb Joseph Lee:
Can anyone please tell me something about 'Completion host signal timed out' error message?
You get this message because the SDHC driver timed out when waiting for the host state that signals that both the command and the transfer of a multi-block access completed. In short, either one of the bits "transfer-complete"/"command-complete" is missing or an unexpected IRQ (e.g. an error) was raised. This may be a bug in the driver. To make sure which is the case, could you please replace
if (!wait_for<Irqstat>(irq_goal, _delayer)) { PERR("Completion host signal timed out");
in [1] with
if (!wait_for<Irqstat>(irq_goal, _delayer, 3000)) { PERR("Completion host signal timed out %x", read<Irqstat>());
and post the new log (I also raised the time out, just in case that the operation simple takes longer in your case).
Could you please also send me your custom sd_card.run file to enable me to reproduce your scenario (assuming you modified nothing else)?
Cheers, Martin
[2] repos/os/src/drivers/sd_card/spec/imx53/esdhcv2.cc: line 116
Hello Genode community,
I'm testing the port of Qt_5.1.0 in Genode 15.08. I ran the example "qt5_openglwindow" but a sale with black background is shown. I tried it on in the pbxa9 using Qemu with hw and foc.
Hw_pbxa9 serial output: =========================================================== Genode 15.08-215-g455cef5 int main(): --- create local services --- int main(): --- start init --- int main(): transferred 715 MB to init int main(): --- init created, waiting for exit condition --- Quota exceeded! amount=12288, size=12288, consumed=12288 [init -> fb_drv] --- pl11x framebuffer driver --- [init -> ps2_drv] Detected ExPS/2 mouse - activating scroll-wheel and 5-button support. [init -> ps2_drv] Using keyboard with scan code set 1 (xlate). [init -> nitpicker] create session with args: label="wm", ram_quota=28672 [init -> nitpicker] create session with args: label="pointer", ram_quota=28672 [init -> nitpicker] create session with args: label="wm -> decorator", ram_quota=28672 [init -> openglwindow] tar archive 'qt5_fs_openglwindow.tar' local at f0000000, size is 503808 [init -> openglwindow] void init_libc_lock_pipe(): init_libc_lock_pipe() [init -> openglwindow] using the pipe libc plugin [init -> openglwindow] read_rtc: rtc not configured, returning 0 [init -> openglwindow] pid_t getpid(): getpid not implemented [init -> nitpicker] create session with args: label="wm -> openglwindow", ram_quota=28672 [init -> openglwindow] fcntl(): command 4 arg 4 not supported - pipe [init -> openglwindow] fcntl(): command 4 arg 5 not supported - pipe [init -> openglwindow] fcntl(): command 4 arg 4 not supported - pipe [init -> openglwindow] fcntl(): command 4 arg 5 not supported - pipe [init -> openglwindow] read_rtc: rtc not configured, returning 0 [init -> nitpicker] create session with args: label="wm -> openglwindow", ram_quota=28672 [init -> openglwindow] native_probe* native_create_probe(EGLNativeDisplayType): not yet implemented dpy=0 [init -> openglwindow] native_probe_result native_get_probe_result(native_probe*): not yet implemented [init -> openglwindow] falling back to softpipe driver [init -> openglwindow] returned from init display->screen [init -> openglwindow] libEGL debug: Driver API mask: 0xd [init -> openglwindow] called, return 1 connector no RM attachment (faulter 782128 with IP 4832c attempts to read from address 9) init -> openglwindow -> openglwindow: unresolved pagefault at ip=4832c sp=e00feaf8 fault address=9 core -> pager_ep: cannot submit unknown signal context
=========================================================
Foc_pbxa9 serial output: ========================================================= Genode 15.08-215-g455cef5 int main(): --- create local services --- int main(): --- start init --- int main(): transferred 191 MB to init int main(): --- init created, waiting for exit condition --- Quota exceeded! amount=24576, size=4096, consumed=24576 [init] upgrading quota donation for Env::CPU (8192 bytes) [init -> fb_drv] --- pl11x framebuffer driver --- [init -> ps2_drv] Detected ExPS/2 mouse - activating scroll-wheel and 5-button support. [init -> ps2_drv] Using keyboard with scan code set 1 (xlate). [init -> nitpicker] create session with args: label="wm", ram_quota=28672 [init -> nitpicker] create session with args: label="pointer", ram_quota=28672 [init -> nitpicker] create session with args: label="wm -> decorator", ram_quota=28672 [init -> openglwindow] tar archive 'qt5_fs_openglwindow.tar' local at c0000, size is 503808 [init -> openglwindow] void init_libc_lock_pipe(): init_libc_lock_pipe() [init -> openglwindow] using the pipe libc plugin [init -> openglwindow] read_rtc: rtc not configured, returning 0 [init -> openglwindow] pid_t getpid(): getpid not implemented [init -> nitpicker] create session with args: label="wm -> openglwindow", ram_quota=28672 [init -> openglwindow] fcntl(): command 4 arg 4 not supported - pipe [init -> openglwindow] fcntl(): command 4 arg 5 not supported - pipe [init -> openglwindow] fcntl(): command 4 arg 4 not supported - pipe [init -> openglwindow] fcntl(): command 4 arg 5 not supported - pipe [init -> openglwindow] read_rtc: rtc not configured, returning 0 [init -> nitpicker] create session with args: label="wm -> openglwindow", ram_quota=28672 [init -> openglwindow] native_probe* native_create_probe(EGLNativeDisplayType): not yet implemented dpy=0 [init -> openglwindow] native_probe_result native_get_probe_result(native_probe*): not yet implemented [init -> openglwindow] falling back to softpipe driver [init -> openglwindow] returned from init display->screen [init -> openglwindow] libEGL debug: Driver API mask: 0xd [init -> openglwindow] called, return 1 connector no RM attachment (READ pf_addr=8 pf_ip=492b4 from 414000) Genode::Signal_session_component::submit(Genode::Signal_context_capability, unsigned int)::<lambda(Genode::Signal_context_component*)>: invalid signal-context capability Genode::Pager_entrypoint::entry()::<lambda(Genode::Pager_object*)>: Could not resolve pf=8 ip=492b4 ===========================================================
Any idea? Thank you!
Hello Humberto,
On 11/12/2015 06:17 PM, Humberto López León wrote:
Hello Genode community,
I'm testing the port of Qt_5.1.0 in Genode 15.08. I ran the example "qt5_openglwindow" but a sale with black background is shown. I tried it on in the pbxa9 using Qemu with hw and foc.
does it work with this patch from the current Genode master branch?
https://github.com/genodelabs/genode/commit/650267b425b90241bff7c97e2d5a5a32...
Christian
Hi Cristian,
On 11/12/2015 02:54 PM, Christian Prochaska wrote:
Hello Humberto,
On 11/12/2015 06:17 PM, Humberto López León wrote:
Hello Genode community,
I'm testing the port of Qt_5.1.0 in Genode 15.08. I ran the example "qt5_openglwindow" but a sale with black background is shown. I tried it on in the pbxa9 using Qemu with hw and foc.
does it work with this patch from the current Genode master branch?
https://github.com/genodelabs/genode/commit/650267b425b90241bff7c97e2d5a5a32...
Christian
Thanks for the patch, now works correctly the example "qt5_openglwindow".
I also tried two more examples of qt5_gui module (qtbase/examples/gui), the rasterwindow and analogclock. To include these examples in the compilation mechanism of Genode I relied on the example "qt5_openglwindow". Both examples compiled correctly, but do not run as they should. I tried it on Qemu with pbxa9 using the foc kernel.
Foc_pbxa9 serial output (rasterwindow example): ==================================================== Genode 15.08-215-g455cef5 <local changes> int main(): --- create local services --- int main(): --- start init --- int main(): transferred 191 MB to init int main(): --- init created, waiting for exit condition --- Quota exceeded! amount=24576, size=4096, consumed=24576 [init] upgrading quota donation for Env::CPU (8192 bytes) [init -> fb_drv] --- pl11x framebuffer driver --- [init -> ps2_drv] Detected ExPS/2 mouse - activating scroll-wheel and 5-button support. [init -> ps2_drv] Using keyboard with scan code set 1 (xlate). [init -> nitpicker] create session with args: label="wm", ram_quota=28672 [init -> nitpicker] create session with args: label="pointer", ram_quota=28672 [init -> nitpicker] create session with args: label="wm -> decorator", ram_quota=28672 [init -> rasterwindow] tar archive 'qt5_fs_rasterwindow.tar' local at bf000, size is 503808 [init -> rasterwindow] void init_libc_lock_pipe(): init_libc_lock_pipe() [init -> rasterwindow] using the pipe libc plugin [init -> rasterwindow] read_rtc: rtc not configured, returning 0 [init -> rasterwindow] pid_t getpid(): getpid not implemented [init -> nitpicker] create session with args: label="wm -> rasterwindow", ram_quota=28672 [init -> rasterwindow] fcntl(): command 4 arg 4 not supported - pipe [init -> rasterwindow] fcntl(): command 4 arg 5 not supported - pipe [init -> rasterwindow] fcntl(): command 4 arg 4 not supported - pipe [init -> rasterwindow] fcntl(): command 4 arg 5 not supported - pipe [init -> rasterwindow] read_rtc: rtc not configured, returning 0 [init -> rasterwindow] void qDefaultMessageHandler(QtMsgType, const QMessageLogContext&, const QString&): QObject::connect: Cannot connect (null)::framebuffer_changed() to QNitpickerWindowSurface::framebuffer_changed() [init -> nitpicker] create session with args: label="wm -> rasterwindow", ram_quota=28672 no RM attachment (READ pf_addr=0 pf_ip=101ce20 from 414000) Genode::Signal_session_component::submit(Genode::Signal_context_capability, unsigned int)::<lambda(Genode::Signal_context_component*)>: invalid signal-context capability Genode::Pager_entrypoint::entry()::<lambda(Genode::Pager_object*)>: Could not resolve pf=0 ip=101ce20 =====================================================
Foc_pbxa9 serial output (analogclock example): ===================================================== Genode 15.08-215-g455cef5 <local changes> int main(): --- create local services --- int main(): --- start init --- int main(): transferred 191 MB to init int main(): --- init created, waiting for exit condition --- Quota exceeded! amount=24576, size=4096, consumed=24576 [init] upgrading quota donation for Env::CPU (8192 bytes) [init -> fb_drv] --- pl11x framebuffer driver --- [init -> ps2_drv] Detected ExPS/2 mouse - activating scroll-wheel and 5-button support. [init -> ps2_drv] Using keyboard with scan code set 1 (xlate). [init -> nitpicker] create session with args: label="wm", ram_quota=28672 [init -> nitpicker] create session with args: label="pointer", ram_quota=28672 [init -> nitpicker] create session with args: label="wm -> decorator", ram_quota=28672 [init -> analogclock] tar archive 'qt5_fs_analogclock.tar' local at bf000, size is 503808 [init -> analogclock] void init_libc_lock_pipe(): init_libc_lock_pipe() [init -> analogclock] using the pipe libc plugin [init -> analogclock] read_rtc: rtc not configured, returning 0 [init -> analogclock] pid_t getpid(): getpid not implemented [init -> nitpicker] create session with args: label="wm -> analogclock", ram_quota=28672 [init -> analogclock] fcntl(): command 4 arg 4 not supported - pipe [init -> analogclock] fcntl(): command 4 arg 5 not supported - pipe [init -> analogclock] fcntl(): command 4 arg 4 not supported - pipe [init -> analogclock] fcntl(): command 4 arg 5 not supported - pipe [init -> analogclock] read_rtc: rtc not configured, returning 0 [init -> analogclock] void qDefaultMessageHandler(QtMsgType, const QMessageLogContext&, const QString&): QObject::connect: Cannot connect (null)::framebuffer_changed() to QNitpickerWindowSurface::framebuffer_changed() [init -> nitpicker] create session with args: label="wm -> analogclock", ram_quota=28672 no RM attachment (READ pf_addr=0 pf_ip=101ce20 from 414000) Genode::Signal_session_component::submit(Genode::Signal_context_capability, unsigned int)::<lambda(Genode::Signal_context_component*)>: invalid signal-context capability Genode::Pager_entrypoint::entry()::<lambda(Genode::Pager_object*)>: Could not resolve pf=0 ip=101ce20
=====================================================
You have any idea what is happening? Thank you
Humberto
Hello Humberto,
On 11/12/2015 11:17 PM, Humberto López León wrote:
I also tried two more examples of qt5_gui module (qtbase/examples/gui), the rasterwindow and analogclock. To include these examples in the compilation mechanism of Genode I relied on the example "qt5_openglwindow". Both examples compiled correctly, but do not run as they should. I tried it on Qemu with pbxa9 using the foc kernel.
could you provide a Genode branch on github or a patch with the changes you made, so I can easily reproduce the problem?
Christian
Hi Christian
On 11/16/2015 01:14 PM, Christian Prochaska wrote:
Hello Humberto,
On 11/12/2015 11:17 PM, Humberto López León wrote:
I also tried two more examples of qt5_gui module (qtbase/examples/gui), the rasterwindow and analogclock. To include these examples in the compilation mechanism of Genode I relied on the example "qt5_openglwindow". Both examples compiled correctly, but do not run as they should. I tried it on Qemu with pbxa9 using the foc kernel.
could you provide a Genode branch on github or a patch with the changes you made, so I can easily reproduce the problem?
Christian
These are the changes I made. Thank you
Hi Christian,
On 11/16/2015 01:14 PM, Christian Prochaska wrote:
Hello Humberto,
On 11/12/2015 11:17 PM, Humberto López León wrote:
I also tried two more examples of qt5_gui module (qtbase/examples/gui), the rasterwindow and analogclock. To include these examples in the compilation mechanism of Genode I relied on the example "qt5_openglwindow". Both examples compiled correctly, but do not run as they should. I tried it on Qemu with pbxa9 using the foc kernel.
could you provide a Genode branch on github or a patch with the changes you made, so I can easily reproduce the problem?
Christian
With the help of some printf in the example rasterwindow I determined that the application fails in the renderNow() function, specifically when call the following code:
QPaintDevice *device = m_backingStore->paintDevice();
Output to run the application with foc_pbxa9:
Genode 15.08-215-g455cef5 <local changes> int main(): --- create local services --- int main(): --- start init --- int main(): transferred 191 MB to init int main(): --- init created, waiting for exit condition --- Quota exceeded! amount=24576, size=4096, consumed=24576 [init] upgrading quota donation for Env::CPU (8192 bytes) [init -> fb_drv] --- pl11x framebuffer driver --- [init -> ps2_drv] Detected ExPS/2 mouse - activating scroll-wheel and 5-button support. [init -> ps2_drv] Using keyboard with scan code set 1 (xlate). [init -> nitpicker] create session with args: label="wm", ram_quota=28672 [init -> nitpicker] create session with args: label="pointer", ram_quota=28672 [init -> nitpicker] create session with args: label="wm -> decorator", ram_quota=28672 [init -> rasterwindow] tar archive 'qt5_fs_rasterwindow.tar' local at bf000, size is 503808 [init -> rasterwindow] void init_libc_lock_pipe(): init_libc_lock_pipe() [init -> rasterwindow] using the pipe libc plugin [init -> rasterwindow] read_rtc: rtc not configured, returning 0 [init -> rasterwindow] pid_t getpid(): getpid not implemented [init -> nitpicker] create session with args: label="wm -> rasterwindow", ram_quota=28672 [init -> rasterwindow] fcntl(): command 4 arg 4 not supported - pipe [init -> rasterwindow] fcntl(): command 4 arg 5 not supported - pipe [init -> rasterwindow] fcntl(): command 4 arg 4 not supported - pipe [init -> rasterwindow] fcntl(): command 4 arg 5 not supported - pipe [init -> rasterwindow] read_rtc: rtc not configured, returning 0 [init -> rasterwindow] void qDefaultMessageHandler(QtMsgType, const QMessageLogContext&, const QString&): QObject::connect: Cannot connect (null)::framebuffer_changed() to QNitpickerWindowSurface::framebuffer_changed() [init -> nitpicker] create session with args: label="wm -> rasterwindow", ram_quota=28672 [init -> rasterwindow] ============= ok 1============== [init -> rasterwindow] ============= ok 2============== no RM attachment (READ pf_addr=0 pf_ip=101ce74 from 414000) Genode::Signal_session_component::submit(Genode::Signal_context_capability, unsigned int)::<lambda(Genode::Signal_context_component*)>: invalid signal-context capability Genode::Pager_entrypoint::entry()::<lambda(Genode::Pager_object*)>: Could not resolve pf=0 ip=101ce74
I hope this clarifies my problem. In the patch are the printf I used in the application code. Thank you,
Humberto
Hi Christian,
On 11/16/2015 01:14 PM, Christian Prochaska wrote:
Hello Humberto,
On 11/12/2015 11:17 PM, Humberto López León wrote:
I also tried two more examples of qt5_gui module (qtbase/examples/gui), the rasterwindow and analogclock. To include these examples in the compilation mechanism of Genode I relied on the example "qt5_openglwindow". Both examples compiled correctly, but do not run as they should. I tried it on Qemu with pbxa9 using the foc kernel.
could you provide a Genode branch on github or a patch with the changes you made, so I can easily reproduce the problem?
Christian
First I want to explain that I am not an expert in application development QT, nor do I have much experience in working with the framework Genode, but I'm interested in checking the proper functioning of Qt in Genode.
I continued examining the trace of the error in the execution of example qt5_rasterwindow. This is my partial conclusion of the problem:
When the rasterwindow application (defined in qtbase/examples/gui/rasterwindow/rasterwindow.cpp) run the 108 line (QPaintDevice *device = m_backingStore->paintDevice()), this ends calling the function QPaintDevice *QNitpickerWindowSurface::paintDevice() (defined in repos/libports/src/lib/qt5/qtbase/src/plugins/platforms/nitpicker/qnitpickerwindowsurface.cpp). This implementation of paintDevice() function fails in the 62 line (QRect geo = _platform_window->geometry();).
I do not know much about the integration between Nitpicker of Genode and Qt. I apologize for my lack of technical language.
Any idea what is happening? Thank you for the cooperation.
Sincerely Humberto.
Hi Humberto,
thanks for your further investigation. The problem was that the platform window had not been created yet when the QNitpickerWindowSurface's constructor and paintDevice() functions got called. The attached patch fixes the problem for me. The second attached patch fixes the target.mk for the analogclock example, so it uses the correct main.cpp file.
Christian
Hi Christian,
thank you very much for the patch. I verified that all the examples of QtGui work correctly in Genode.
I am also interested in learning about the use of OpenGL in Qt from Genode. I basically like to know how to make the port of some of the ejemlos who are on qtbase/examples/opengl.
Thanks for the collaboration,
Humberto.
On 11/18/2015 02:41 PM, Christian Prochaska wrote:
thanks for your further investigation. The problem was that the platform window had not been created yet when the QNitpickerWindowSurface's constructor and paintDevice() functions got called. The attached patch fixes the problem for me. The second attached patch fixes the target.mk for the analogclock example, so it uses the correct main.cpp file.
Hi Humberto,
On 11/20/2015 04:05 PM, Humberto López León wrote:
I am also interested in learning about the use of OpenGL in Qt from Genode. I basically like to know how to make the port of some of the ejemlos who are on qtbase/examples/opengl.
The examples in this directory require the QtOpenGL library, which had not been ported to Genode, yet. You can find a patch at [1], which adds this library. The 'qt5_opengl_generated.inc' file has been created according to the instructions in [2]. I haven't tested the library with one of the OpenGL examples, yet. Just checked that it compiles without errors.
Christian
[1] https://github.com/cproc/genode/commit/146d52d443d88bf3da2c7e27c479f8fcc4d65... [2] https://github.com/cproc/genode/blob/9ced9ff085b19e7bca74ee6506cba66cc9491d3...
Hi Martin, thank you so much! it works for me.
Now I just need to use the sd_card driver with Genode trustzone feature (hw_imx53_qsb_tz). I tried to incorporate sd_card driver with tz_vmm run script and make run/tz_vmm. I get the following log messages and it gets stuck. it doesn't even run tz_vmm application. I appreciate if you can give me some hints to fix this.
kernel initialized Genode 15.08 int main(): create local services int main(): start init int main(): transferred 248 MB to init int main(): init created, waiting for exit condition
[init -> sd_card_drv] Could not open ROM session for module "config [init -> sd_card_drv] Could not obtain config file [init -> sd_card_drv] no VFS configured [init -> sd_card_drv] --- Imx53 SD card driver ---
thanks,
On Wed, Nov 11, 2015 at 3:03 PM, Martin Stein <martin.stein@...1...> wrote:
Hey Joseph,
Am 11.11.2015 um 00:53 schrieb Joseph Lee:
Can anyone please tell me something about 'Completion host signal timed
out' error message?
You get this message because the SDHC driver timed out when waiting for the host state that signals that both the command and the transfer of a multi-block access completed. In short, either one of the bits "transfer-complete"/"command-complete" is missing or an unexpected IRQ (e.g. an error) was raised. This may be a bug in the driver. To make sure which is the case, could you please replace
if (!wait_for<Irqstat>(irq_goal, _delayer)) { PERR("Completion host signal timed out");
in [1] with
if (!wait_for<Irqstat>(irq_goal, _delayer, 3000)) { PERR("Completion host signal timed out %x", read<Irqstat>());
and post the new log (I also raised the time out, just in case that the operation simple takes longer in your case).
Could you please also send me your custom sd_card.run file to enable me to reproduce your scenario (assuming you modified nothing else)?
Cheers, Martin
[2] repos/os/src/drivers/sd_card/spec/imx53/esdhcv2.cc: line 116
genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hi Joseph,
Am 15.11.2015 um 03:05 schrieb Joseph Lee:
Hi Martin, thank you so much! it works for me.
Nice! Could you please also share with us what the problem was and what solved it.
Now I just need to use the sd_card driver with Genode trustzone feature (hw_imx53_qsb_tz). I tried to incorporate sd_card driver with tz_vmm run script and make run/tz_vmm. I get the following log messages and it gets stuck. it doesn't even run tz_vmm application. I appreciate if you can give me some hints to fix this.
As already mentioned earlier in this discussion, hw_imx53_qsb_tz sets the ESDHC MMIO and IRQs unsecure. This is done in [1], [2] and [3]. You can find examples on how to do Trustzone settings specifier-dependend in my working branch [4].
Cheers, Martin
[1] repos/base-hw/src/core/include/spec/imx53/trustzone/csu.h:159 [2] repos/base-hw/src/core/include/spec/imx53/trustzone/csu.h:215 [3] repos/base-hw/src/core/spec/imx53/trustzone/platform_support.cc:48 [4] https://github.com/m-stein/genode/tree/1497_usb_armory_demo
Hi Martin,
On Mon, Nov 16, 2015 at 12:37 PM, Martin Stein <martin.stein@...1...
wrote:
Hi Joseph,
Am 15.11.2015 um 03:05 schrieb Joseph Lee:
Hi Martin, thank you so much! it works for me.
Nice! Could you please also share with us what the problem was and what solved it.
the problem was that the SDHC driver timed out which then generates the "Completion host signal timed out" error message. It is solved by replacing
if (!wait_for<Irqstat>(irq_goal, _delayer)) { PERR("Completion host signal timed out");
in [1] with
if (!wait_for<Irqstat>(irq_goal, _delayer, 3000)) { PERR("Completion host signal timed out %x", read<Irqstat>());
[1] repos/os/src/drivers/sd_card/spec/imx53/esdhcv2.cc: line 116
Now I just need to use the sd_card driver with Genode trustzone feature (hw_imx53_qsb_tz). I tried to incorporate sd_card driver with tz_vmm run script and make run/tz_vmm. I get the following log messages and it gets stuck. it doesn't even run tz_vmm application. I appreciate if you can give me some hints to fix this.
As already mentioned earlier in this discussion, hw_imx53_qsb_tz sets the ESDHC MMIO and IRQs unsecure. This is done in [1], [2] and [3]. You can find examples on how to do Trustzone settings specifier-dependend in my working branch [4].
I tried to modify trustzone settings for ESDHC MMIO and IRQs and make run/tz_vmm. it hangs when the Linux kernel tries to access the sd_card and displays the following error message.
mxsdhci: MXC Secure Digital Host Controller Interface driver mxsdhci: MXC SDHCI Controller Driver. [init -> tz_vmm] Cpu state: [init -> tz_vmm] Register Virt Phys [init -> tz_vmm] --------------------------------- [init -> tz_vmm] r0 = c5bc6e00 [85bc6e00] [init -> tz_vmm] r1 = 00000001 [00000000] [init -> tz_vmm] r2 = c030aef8 [8030aef8] [init -> tz_vmm] r3 = c690e000 [50004000] [init -> tz_vmm] r4 = c5bc6e00 [85bc6e00] [init -> tz_vmm] r5 = c5bc6e00 [85bc6e00] [init -> tz_vmm] r6 = 00000000 [00000000] [init -> tz_vmm] r7 = 00000001 [00000000] [init -> tz_vmm] r8 = c088cf50 [8088cf50] [init -> tz_vmm] r9 = 00000000 [00000000] [init -> tz_vmm] r10 = 00000001 [00000000] [init -> tz_vmm] r11 = c5b5b0c0 [85b5b0c0] [init -> tz_vmm] r12 = 00002000 [00000000] [init -> tz_vmm] sp = 00000000 [00000000] [init -> tz_vmm] lr = 00000000 [00000000] [init -> tz_vmm] ip = c0309288 [80309288] [init -> tz_vmm] cpsr = 20000013 [init -> tz_vmm] sp_und = c08e3978 [808e3978] [init -> tz_vmm] lr_und = c08e3978 [808e3978] [init -> tz_vmm] spsr_und = 00000000 [00000000] [init -> tz_vmm] sp_svc = c5023ee8 [85023ee8] [init -> tz_vmm] lr_svc = c030afd0 [8030afd0] [init -> tz_vmm] spsr_svc = 60000013 [00000000] [init -> tz_vmm] sp_abt = c08e396c [808e396c] [init -> tz_vmm] lr_abt = c0038a20 [80038a20] [init -> tz_vmm] spsr_abt = 20000093 [00000000] [init -> tz_vmm] sp_irq = c08e3960 [808e3960] [init -> tz_vmm] lr_irq = c0038a80 [80038a80] [init -> tz_vmm] spsr_irq = 60000093 [00000000] [init -> tz_vmm] sp_fiq = 00000000 [00000000] [init -> tz_vmm] lr_fiq = 00000000 [00000000] [init -> tz_vmm] spsr_fiq = 00000000 [00000000] [init -> tz_vmm] ttbr0 = 85e34019 [init -> tz_vmm] ttbr1 = 80004019 [init -> tz_vmm] ttbrc = 00000000 [init -> tz_vmm] dfar = c690e02c [5000402c] [init -> tz_vmm] exception = data_abort [init -> tz_vmm] Could not handle data-abort will exit!
Thanks,
Cheers, Martin
[1] repos/base-hw/src/core/include/spec/imx53/trustzone/csu.h:159 [2] repos/base-hw/src/core/include/spec/imx53/trustzone/csu.h:215 [3] repos/base-hw/src/core/spec/imx53/trustzone/platform_support.cc:48 [4] https://github.com/m-stein/genode/tree/1497_usb_armory_demo
Presto, an open source distributed SQL query engine for big data, initially developed by Facebook, enables you to easily query your data on Hadoop in a more interactive manner. Teradata is also now providing full enterprise support for Presto. Download a free open source copy now. http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140 _______________________________________________ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hey Joseph,
Am 19.11.2015 um 01:58 schrieb Joseph Lee:
the problem was that the SDHC driver timed out which then generates the "Completion host signal timed out" error message. It is solved by replacing
if (!wait_for<Irqstat>(irq_goal, _delayer)) { PERR("Completion host signal timed out");
in [1] with
if (!wait_for<Irqstat>(irq_goal, _delayer, 3000)) { PERR("Completion host signal timed out %x", read<Irqstat>());
Thank you for the info :)
I tried to modify trustzone settings for ESDHC MMIO and IRQs and make run/tz_vmm. it hangs when the Linux kernel tries to access the sd_card and displays the following error message.
mxsdhci: MXC Secure Digital Host Controller Interface driver mxsdhci: MXC SDHCI Controller Driver. [init -> tz_vmm] Cpu state: [init -> tz_vmm] Register Virt Phys [init -> tz_vmm] --------------------------------- [init -> tz_vmm] r0 = c5bc6e00 [85bc6e00] [init -> tz_vmm] r1 = 00000001 [00000000] [init -> tz_vmm] r2 = c030aef8 [8030aef8] [init -> tz_vmm] r3 = c690e000 [50004000] [init -> tz_vmm] r4 = c5bc6e00 [85bc6e00] [init -> tz_vmm] r5 = c5bc6e00 [85bc6e00] [init -> tz_vmm] r6 = 00000000 [00000000] [init -> tz_vmm] r7 = 00000001 [00000000] [init -> tz_vmm] r8 = c088cf50 [8088cf50] [init -> tz_vmm] r9 = 00000000 [00000000] [init -> tz_vmm] r10 = 00000001 [00000000] [init -> tz_vmm] r11 = c5b5b0c0 [85b5b0c0] [init -> tz_vmm] r12 = 00002000 [00000000] [init -> tz_vmm] sp = 00000000 [00000000] [init -> tz_vmm] lr = 00000000 [00000000] [init -> tz_vmm] ip = c0309288 [80309288] [init -> tz_vmm] cpsr = 20000013 [init -> tz_vmm] sp_und = c08e3978 [808e3978] [init -> tz_vmm] lr_und = c08e3978 [808e3978] [init -> tz_vmm] spsr_und = 00000000 [00000000] [init -> tz_vmm] sp_svc = c5023ee8 [85023ee8] [init -> tz_vmm] lr_svc = c030afd0 [8030afd0] [init -> tz_vmm] spsr_svc = 60000013 [00000000] [init -> tz_vmm] sp_abt = c08e396c [808e396c] [init -> tz_vmm] lr_abt = c0038a20 [80038a20] [init -> tz_vmm] spsr_abt = 20000093 [00000000] [init -> tz_vmm] sp_irq = c08e3960 [808e3960] [init -> tz_vmm] lr_irq = c0038a80 [80038a80] [init -> tz_vmm] spsr_irq = 60000093 [00000000] [init -> tz_vmm] sp_fiq = 00000000 [00000000] [init -> tz_vmm] lr_fiq = 00000000 [00000000] [init -> tz_vmm] spsr_fiq = 00000000 [00000000] [init -> tz_vmm] ttbr0 = 85e34019 [init -> tz_vmm] ttbr1 = 80004019 [init -> tz_vmm] ttbrc = 00000000 [init -> tz_vmm] dfar = c690e02c [5000402c] [init -> tz_vmm] exception = data_abort [init -> tz_vmm] Could not handle data-abort will exit!
As you configured your ESDHC secure, unsecure Linux consequently isn't allowed anymore to access it. If you want to let both Linux and Genode access the ESDHC you can use an SMC-based stub block driver in the unsecure world. You might have a look at [1] (unsecure sided driver) and [2] (secure sided back-end) as an inspiration. In this example, Genode secures the ESDHC in general but, via part_blk and tz_vmm, provides the second partition of an ESDHC medium to the Linux stub block driver.
Cheers, Martin
[1] https://github.com/m-stein/genode/commit/225f1fe1296da11b8304ebe55a4c23f6e29...
repos/os/src/server/tz_vmm/include/block.h repos/os/src/server/tz_vmm/block.cc
[2] https://github.com/m-stein/linux/commit/9418cc87ed26b6cd7c4ec66ba4bdc1f998cd...
drivers/block/genode.c
Hi Martin,
I really appreciate your kind response.
I just want to let only Genode to access the ESDHC and run tz_vmm successfully without generating data abort exception . Can i disable the ESDHC in the Linux kernel so that the Linux (unsecure side) can't request to access the ESDHC. Please let me know if it is possible and how i can do that. Or is there something to do this in Genode configuration?
Thanks,
On Thu, Nov 19, 2015 at 11:19 AM, Martin Stein <martin.stein@...1...
wrote:
Hey Joseph,
Am 19.11.2015 um 01:58 schrieb Joseph Lee:
the problem was that the SDHC driver timed out which then generates the "Completion host signal timed out" error message. It is solved by
replacing
if (!wait_for<Irqstat>(irq_goal, _delayer)) { PERR("Completion host signal timed out");
in [1] with
if (!wait_for<Irqstat>(irq_goal, _delayer, 3000)) { PERR("Completion host signal timed out %x", read<Irqstat>());
Thank you for the info :)
I tried to modify trustzone settings for ESDHC MMIO and IRQs and make run/tz_vmm. it hangs when the Linux kernel tries to access the sd_card and displays the following error message.
mxsdhci: MXC Secure Digital Host Controller Interface driver mxsdhci: MXC SDHCI Controller Driver. [init -> tz_vmm] Cpu state: [init -> tz_vmm] Register Virt Phys [init -> tz_vmm] --------------------------------- [init -> tz_vmm] r0 = c5bc6e00 [85bc6e00] [init -> tz_vmm] r1 = 00000001 [00000000] [init -> tz_vmm] r2 = c030aef8 [8030aef8] [init -> tz_vmm] r3 = c690e000 [50004000] [init -> tz_vmm] r4 = c5bc6e00 [85bc6e00] [init -> tz_vmm] r5 = c5bc6e00 [85bc6e00] [init -> tz_vmm] r6 = 00000000 [00000000] [init -> tz_vmm] r7 = 00000001 [00000000] [init -> tz_vmm] r8 = c088cf50 [8088cf50] [init -> tz_vmm] r9 = 00000000 [00000000] [init -> tz_vmm] r10 = 00000001 [00000000] [init -> tz_vmm] r11 = c5b5b0c0 [85b5b0c0] [init -> tz_vmm] r12 = 00002000 [00000000] [init -> tz_vmm] sp = 00000000 [00000000] [init -> tz_vmm] lr = 00000000 [00000000] [init -> tz_vmm] ip = c0309288 [80309288] [init -> tz_vmm] cpsr = 20000013 [init -> tz_vmm] sp_und = c08e3978 [808e3978] [init -> tz_vmm] lr_und = c08e3978 [808e3978] [init -> tz_vmm] spsr_und = 00000000 [00000000] [init -> tz_vmm] sp_svc = c5023ee8 [85023ee8] [init -> tz_vmm] lr_svc = c030afd0 [8030afd0] [init -> tz_vmm] spsr_svc = 60000013 [00000000] [init -> tz_vmm] sp_abt = c08e396c [808e396c] [init -> tz_vmm] lr_abt = c0038a20 [80038a20] [init -> tz_vmm] spsr_abt = 20000093 [00000000] [init -> tz_vmm] sp_irq = c08e3960 [808e3960] [init -> tz_vmm] lr_irq = c0038a80 [80038a80] [init -> tz_vmm] spsr_irq = 60000093 [00000000] [init -> tz_vmm] sp_fiq = 00000000 [00000000] [init -> tz_vmm] lr_fiq = 00000000 [00000000] [init -> tz_vmm] spsr_fiq = 00000000 [00000000] [init -> tz_vmm] ttbr0 = 85e34019 [init -> tz_vmm] ttbr1 = 80004019 [init -> tz_vmm] ttbrc = 00000000 [init -> tz_vmm] dfar = c690e02c [5000402c] [init -> tz_vmm] exception = data_abort [init -> tz_vmm] Could not handle data-abort will exit!
As you configured your ESDHC secure, unsecure Linux consequently isn't allowed anymore to access it. If you want to let both Linux and Genode access the ESDHC you can use an SMC-based stub block driver in the unsecure world. You might have a look at [1] (unsecure sided driver) and [2] (secure sided back-end) as an inspiration. In this example, Genode secures the ESDHC in general but, via part_blk and tz_vmm, provides the second partition of an ESDHC medium to the Linux stub block driver.
Cheers, Martin
[1]
https://github.com/m-stein/genode/commit/225f1fe1296da11b8304ebe55a4c23f6e29...
repos/os/src/server/tz_vmm/include/block.h repos/os/src/server/tz_vmm/block.cc
[2]
https://github.com/m-stein/linux/commit/9418cc87ed26b6cd7c4ec66ba4bdc1f998cd...
drivers/block/genode.c
genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hey Joseph,
Am 19.11.2015 um 13:44 schrieb Joseph Lee:
I just want to let only Genode to access the ESDHC and run tz_vmm successfully without generating data abort exception . Can i disable the ESDHC in the Linux kernel so that the Linux (unsecure side) can't request to access the ESDHC. Please let me know if it is possible and how i can do that.
You can do this by adapting the Linux config using a text editor (editing .config or arch/arm/configs/YOUR_CONFIG) or tools like 'make menuconfig'. For information on Linux configs in general or on how to use related tools, please refer to the varied online documentation. For information on what to adapt, you can have a look at the Linux commit I posted in my last mail [2] as it consequently disables ESDHC too.
Or is there something to do this in Genode configuration?
No. You might ignore the data aborts and simply continue VM execution but I assume that this would lead to more or less critical errors in Linux.
Cheers, Martin
[2] https://github.com/m-stein/linux/commit/9418cc87ed26b6cd7c4ec66ba4bdc1f998cd...