Guys, I'm looking forward to run vpp in mips32 arch,but problem was caused by "clib_calljmp","clib_setjmp" and "clib_longjmp". There is no code for mips32 in vpp, so I wrote them by myself, and they worked very well in my test program, However,when I run vpp with them, segmentation fault was happend when excute a system call like "open","SYS_clock_gettime",etc.
The "stack" in "clib_calljmp" was alloced by "clib_mem_alloc_aligned", It is strange that if I did not use "clib_mem_alloc_aligned" but with "malloc", the problem is still there but less happened. Sometimes it occurs, but sometimes it's ok. Here is the code I worte for mips32. uword clib_calljmp (uword (*func) (uword func_arg), uword func_arg, void *stack) { unsigned long ret=0; __asm__ volatile ( ".set push \n" "move $23, $29\n" "li $9, 4\n\t" "subu $8, %3, $9\n\t" "sll $8, $8, 0\n\t" "move $29, $8\n\t" "move $9, %1\n\t" "move $4, %2\n\t" "move $25,$9\n\t" "move $22, $31\n\t" "jalr.hb $25\n\t" "nop\n\t" "move %0, $2\n\t" "move $29,$23\n" "move $31, $22\n\t" ".set pop\n" :"=r"(ret) :"r"(func),"r"(func_arg),"r"(stack) :"$8","$9","$23","$22" ); return ret; } Thanks, Xinying Xue
_______________________________________________ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev