* stack pointer used in vector_swi() in arm linux system call
@ 2018-10-02 14:52 Anonymous Page
0 siblings, 0 replies; only message in thread
From: Anonymous Page @ 2018-10-02 14:52 UTC (permalink / raw)
To: kernelnewbies
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-10-02 14:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-02 14:52 stack pointer used in vector_swi() in arm linux system call Anonymous Page
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).