Hi Steve, Steve Spano wrote:
I have a few questions. Mostly, asm volatile ( "addik r12, r0, %1 \n\t" "addk r5, r0, %2 \n\t" "brki r14, 0x8; \n\t" "addk %0, r3, r0 \n\t" : "=r" (ret) : "i" (__NR_clone), "r" (arg0) : "r3", "r4", "r5", "r12", "r14", "cc"); It looks like this routine is saving the current PC into R14 and then branching to 0x0000:0008. Isn't this the user interrupt vector? What is supposed to be loaded here? Something to support context switching?
This is the mb-uclinux system call interface. You'll see exactly the same construct in e.g. include/asm-microblaze/unistd.h
Loading r12 with the syscall number, r5-r10 with the parameters, then issuing brki r14, 0x8 is a system call.
In this case, it's doing a clone() to create a new kernel thread. The only thing microblaze-specific here is the mechanics of issuing the syscall.
Hope this clarifies things for you. John ___________________________ microblaze-uclinux mailing list microblaze-uclinux@xxxxxxxxxxxxxx Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/