AnsweredAssumed Answered

DirectFB (Multi Application core) with linux-fusion kenel module

Question asked by Minseok Park on Jun 26, 2017
Latest reply on Jun 27, 2017 by Bio_TICFSL

Hello, 

 

I try to run any DirectFB (Multi Application Core) application (with Fusion library and the linux-fusion kernel module) on i.MX6 Solo. The version of DirectFB is 1.4.0 (LTIB).

 

My system was failed with the debugging message (shown below)

"Fusion/Init: Mapping shared area failed!" 

This log message occurs when mmap() failed in fusion_enter() in fusion.c .

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

shared = mmap( (void*) 0x20000000 + 0x2000 * world_index, sizeof(FusionWorldShared),
                     PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, fd, 0 );
if (shared == MAP_FAILED) {
   D_PERROR( "Fusion/Init: Mapping shared area failed! tid[%d]\n",direct_gettid() );
   goto error;
}

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

 

The first application (FER_ANY, FUSION_ID_MASTER) passes mmap() successfully.

But from the second application, mmap() returns an error (MAP_FAILED).

 

I found the cause of this fail(MAP_FAILED) in fusion_mmap() in fuseiondev.c 

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

if (fusionee_id(fusionee) != FUSION_ID_MASTER && (vma->vm_flags & VM_WRITE))
   return -EPERM;

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

From the second application, the fusion_id is not FUSION_ID_MASTER and the flag has O_RDWR.

So the applications that fusion_id is not FUSION_ID_MASTER will fail when executing mmap(). 

 

If the code above (fusion_mmap()) is correct, it seems I am using DirectFB incorrectly. 

Please help me if you know this problem.

Outcomes