stack pointer used in vector_swi() in arm linux system call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

While reading the vector_swi() routine for arm linux system call, I
found that r0-r12 registers are copied to the kernel stack(below is
the code).

ENTRY(vector_swi)
#ifdef CONFIG_CPU_V7M
        v7m_exception_entry
#else
        sub     sp, sp, #S_FRAME_SIZE
        stmia   sp, {r0 - r12}                           @ Calling r0 - r12

As per my understanding, during system call arm enters into svc mode
and jumps to vector_swi()routine and begins execution. The sp register
of svc mode(sp_svc)points to kernel stack. r0-r12 registers are copied
to the kernel stack.

My question is how is the sp (sp_svc) register setup?

How does it know the address of kernel stack? Is this kernel stack
same as the process's(the process that called system call) kernel
stack?

Thanks & Regards

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux