DSB instruction and ARMv6 - Raspberry Pi Forums
i'm working on port of mit/intel cilk runtime arm
viewtopic.php?f=33&t=102743
, trying put binary package runs on both original raspberry pi , new pi 2b. difficulty pi 2b needs dsb data synchronization barrier instruction manage multi-core hardware whereas original pi doesn't have instruction. make definition
#define __cilkrts_fence() __asm__ volatile ("dsb")
in runtime source , works fine on pi 2b. binary equivalent to
#define __cilkrts_fence() __asm__ volatile (".word 0xf57ff04f")
again works fine on pi 2b , has advantage can compiled assembler in armv6 mode. not surprisingly resulting binary gives "illegal instruction" trap when run on original pi. therefore, need insert code tests cpuid register , makes relative branch skip past dsb instruction if cpuid armv6. logically code should function as
if cpuid != armv6 dsb
, written in inline assembler. while expect simple enough, i'm complete noob @ arm assembler , appreciate offered.
viewtopic.php?f=33&t=102743
, trying put binary package runs on both original raspberry pi , new pi 2b. difficulty pi 2b needs dsb data synchronization barrier instruction manage multi-core hardware whereas original pi doesn't have instruction. make definition
#define __cilkrts_fence() __asm__ volatile ("dsb")
in runtime source , works fine on pi 2b. binary equivalent to
#define __cilkrts_fence() __asm__ volatile (".word 0xf57ff04f")
again works fine on pi 2b , has advantage can compiled assembler in armv6 mode. not surprisingly resulting binary gives "illegal instruction" trap when run on original pi. therefore, need insert code tests cpuid register , makes relative branch skip past dsb instruction if cpuid armv6. logically code should function as
if cpuid != armv6 dsb
, written in inline assembler. while expect simple enough, i'm complete noob @ arm assembler , appreciate offered.
viewtopic.php?f=72&t=13959 may of use.
raspberrypi
Comments
Post a Comment