some question about kernel stack(following init_thread_union)

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

 



hi,everybody.

I am sorry to send a same email without subject for this question.^_^

 

I don't know why use the "stmia  sp, {r0, lr}" instruction rather than "stmdb sp, {r0, lr}" in the macros "vector_stub" defined in file "arch/arm/kernel/entry-armv.S".

 

becaue the "sp" register is point to the kernel stack top.

The "sp" register is initialized with "init_thread_union + THREAD_START_SP"

 

Kernel stack:

=======================================================================

Lower address                                           higher address

| init_thread_union|                 <-------stack content--------|

                                     sp

|<----------------------------8K bytes--------------------------->|

=======================================================================

 

According to the Kernel stack mechanismI think that it should be "stmdb sp, {r0, lr}" and the SP should decrement.

 


[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