Re: How Kernel stack is used in case of different processor mode in ARM architecture?

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

 



On Tue, Mar 25, 2014 at 2:58 PM, Arun KS <getarunks@xxxxxxxxx> wrote:
> Hello Rahul,
>
> On Tue, Mar 25, 2014 at 6:29 AM, Rahul Garg <rahul.lnmiit@xxxxxxxxx> wrote:
>> As I understand every process have a user stack and kernel stack.
> True.
>
>> Apart from that there is a stack for every mode in ARM achitecture. So
> This is wrong.
> Only irq, abort and undefined modes have stacks in linux. That too is
> very limited, 3 bytes per mode per cpu.
> Have a look at arch/arm/kernel/irq.c
Sorry. Wrong file, its at arch/arm/kernel/setup.c

Thanks,
Arun
> struct stack {
>         u32 irq[3];
>         u32 abt[3];
>         u32 und[3];
> } ____cacheline_aligned;
>
> kernel runs in SVC mode and the stack used belong to the kernel stack
> of the current task.
> Even irq, abort and undefined exception handlers use kernel stack of
> current task. All the exception
> handlers switch to SVC mode at a very early stage and use kernel
> stack. Those 3 bytes are used
> as stack just during the transition phase(for example transition from
> irq to svc mode during and interrupt).
>
> Thanks,
> Arun
>> I want to know How different stack and stack pointer works in ARM
>> modes? Also when this kernel stack associated with the process will be
>> used ?
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies@xxxxxxxxxxxxxxxxx
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://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