L4_SYSCALL_INVOKE is a negative PC value?

Zachary czzcz at 126.com
Fri Sep 26 09:22:09 CEST 2014


hello everyone,
In cache.h file(..\l4\pkg\l4sys\include\ARCH-arm\cache.h), a piece of code 
is as follows:

l4_cache_op_arm_call(unsigned long op,
                     unsigned long start,
                     unsigned long end)
{
  ...

  __asm__ __volatile__
    ("@ l4_cache_op_arm_call(start) \n\t"
     "mov     lr, pc	            \n\t"
     "mov     pc, %[sc]	            \n\t"
     "@ l4_cache_op_arm_call(end)   \n\t"
       :
	"=r" (_op),
	"=r" (_start),
	"=r" (_end)
       :
       [sc] "i" (L4_SYSCALL_MEM_OP),
	"0" (_op),
	"1" (_start),
	"2" (_end)
       :
	"cc", "memory", "lr"
       );
}

My question is whether the code means that PC jumps to the address of 
L4_SYSCALL_MEM_OP(actual value is -0x00000010)? If it is true, then it means
the address is 0xFFFFFFF0 ?

My second question is whether the address 0xFFFFFFF0 corresponds to the 
sys_arm_mem_op in the following definition?
(..\kernel\fiasco\src\kern\arm\asm_entry.h) 

/*********************************************************************/
/* The syscall table stuff                                           */
/*********************************************************************/
.macro GEN_SYSCALL_TABLE
.align 4
.global sys_call_table
sys_call_table:
	.word sys_kdb_ke
	.word sys_kdb_ke
	.word sys_ipc_wrapper
	.word sys_arm_mem_op
	.word sys_invoke_debug_wrapper
	.word sys_kdb_ke
	.word sys_kdb_ke
	.word sys_kdb_ke
	.word sys_kdb_ke
	.word sys_kdb_ke
	.word sys_kdb_ke
.endm

Thank you so much.
Best,
Zachary




More information about the l4-hackers mailing list